Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
hive
hive
Commits
eda528d7
Commit
eda528d7
authored
Jul 23, 2020
by
Mariusz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A virtual operation `comment_payout_update_operation` carries an information if a `paidout` is done
parent
2e979ee0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
libraries/chain/database.cpp
libraries/chain/database.cpp
+3
-1
libraries/chain/util/impacted.cpp
libraries/chain/util/impacted.cpp
+5
-0
libraries/protocol/include/hive/protocol/hive_virtual_operations.hpp
...rotocol/include/hive/protocol/hive_virtual_operations.hpp
+3
-2
No files found.
libraries/chain/database.cpp
View file @
eda528d7
...
...
@@ -2733,7 +2733,9 @@ share_type database::cashout_comment_helper( util::comment_reward_context& ctx,
c
.
last_payout
=
head_block_time
();
}
);
push_virtual_operation
(
comment_payout_update_operation
(
get_account
(
comment_cashout
.
author_id
).
name
,
to_string
(
comment_cashout
.
permlink
)
)
);
push_virtual_operation
(
comment_payout_update_operation
(
get_account
(
comment_cashout
.
author_id
).
name
,
to_string
(
comment_cashout
.
permlink
),
comment_cashout
.
cashout_time
==
fc
::
time_point_sec
::
maximum
()
)
);
const
auto
&
vote_idx
=
get_index
<
comment_vote_index
>
().
indices
().
get
<
by_comment_voter
>
();
auto
vote_itr
=
vote_idx
.
lower_bound
(
comment
.
get_id
()
);
...
...
libraries/chain/util/impacted.cpp
View file @
eda528d7
...
...
@@ -252,6 +252,11 @@ struct get_impacted_account_visitor
_impacted
.
emplace
(
op
.
voter
);
}
void
operator
()(
const
comment_payout_update_operation
&
op
)
{
_impacted
.
insert
(
op
.
author
);
}
void
operator
()(
const
comment_benefactor_reward_operation
&
op
)
{
_impacted
.
insert
(
op
.
benefactor
);
...
...
libraries/protocol/include/hive/protocol/hive_virtual_operations.hpp
View file @
eda528d7
...
...
@@ -145,10 +145,11 @@ namespace hive { namespace protocol {
struct
comment_payout_update_operation
:
public
virtual_operation
{
comment_payout_update_operation
()
{}
comment_payout_update_operation
(
const
account_name_type
&
a
,
const
string
&
p
)
:
author
(
a
),
permlink
(
p
)
{}
comment_payout_update_operation
(
const
account_name_type
&
a
,
const
string
&
p
,
bool
ip
)
:
author
(
a
),
permlink
(
p
),
is_paidout
(
ip
)
{}
account_name_type
author
;
string
permlink
;
bool
is_paidout
;
};
struct
effective_comment_vote_operation
:
public
virtual_operation
...
...
@@ -270,7 +271,7 @@ FC_REFLECT( hive::protocol::shutdown_witness_operation, (owner) )
FC_REFLECT
(
hive
::
protocol
::
fill_order_operation
,
(
current_owner
)(
current_orderid
)(
current_pays
)(
open_owner
)(
open_orderid
)(
open_pays
)
)
FC_REFLECT
(
hive
::
protocol
::
fill_transfer_from_savings_operation
,
(
from
)(
to
)(
amount
)(
request_id
)(
memo
)
)
FC_REFLECT
(
hive
::
protocol
::
hardfork_operation
,
(
hardfork_id
)
)
FC_REFLECT
(
hive
::
protocol
::
comment_payout_update_operation
,
(
author
)(
permlink
)
)
FC_REFLECT
(
hive
::
protocol
::
comment_payout_update_operation
,
(
author
)(
permlink
)
(
is_paidout
)
)
FC_REFLECT
(
hive
::
protocol
::
effective_comment_vote_operation
,
(
voter
)(
author
)(
permlink
)(
weight
)(
rshares
)(
vote_percent
)(
pending_payout
))
FC_REFLECT
(
hive
::
protocol
::
return_vesting_delegation_operation
,
(
account
)(
vesting_shares
)
)
FC_REFLECT
(
hive
::
protocol
::
comment_benefactor_reward_operation
,
(
benefactor
)(
author
)(
permlink
)(
hbd_payout
)(
hive_payout
)(
vesting_payout
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment