Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
hive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
47
Issues
47
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
hive
hive
Commits
41716bb2
Commit
41716bb2
authored
Jul 20, 2020
by
Mariusz
Committed by
Bartek Wrona
Jul 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extension of `comment_reward_operation`
parent
449a3ac0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
libraries/chain/database.cpp
libraries/chain/database.cpp
+3
-1
libraries/protocol/include/hive/protocol/hive_virtual_operations.hpp
...rotocol/include/hive/protocol/hive_virtual_operations.hpp
+8
-3
No files found.
libraries/chain/database.cpp
View file @
41716bb2
...
...
@@ -2680,7 +2680,9 @@ share_type database::cashout_comment_helper( util::comment_reward_context& ctx,
adjust_total_payout
(
comment_cashout
,
hbd_payout
.
first
+
to_hbd
(
hbd_payout
.
second
+
asset
(
vesting_hive
,
HIVE_SYMBOL
)
),
to_hbd
(
asset
(
curation_tokens
,
HIVE_SYMBOL
)
),
to_hbd
(
asset
(
total_beneficiary
,
HIVE_SYMBOL
)
)
);
post_push_virtual_operation
(
vop
);
vop
=
comment_reward_operation
(
comment_author
,
to_string
(
comment_cashout
.
permlink
),
to_hbd
(
asset
(
claimed_reward
,
HIVE_SYMBOL
)
),
author_tokens
);
vop
=
comment_reward_operation
(
comment_author
,
to_string
(
comment_cashout
.
permlink
),
to_hbd
(
asset
(
claimed_reward
,
HIVE_SYMBOL
)
),
author_tokens
,
comment_cashout
.
total_payout_value
,
comment_cashout
.
curator_payout_value
,
comment_cashout
.
beneficiary_payout_value
);
pre_push_virtual_operation
(
vop
);
post_push_virtual_operation
(
vop
);
...
...
libraries/protocol/include/hive/protocol/hive_virtual_operations.hpp
View file @
41716bb2
...
...
@@ -36,13 +36,18 @@ namespace hive { namespace protocol {
struct
comment_reward_operation
:
public
virtual_operation
{
comment_reward_operation
()
=
default
;
comment_reward_operation
(
const
account_name_type
&
a
,
const
string
&
pl
,
const
asset
&
p
,
share_type
ar
)
:
author
(
a
),
permlink
(
pl
),
payout
(
p
),
author_rewards
(
ar
)
{}
comment_reward_operation
(
const
account_name_type
&
a
,
const
string
&
pl
,
const
asset
&
p
,
share_type
ar
,
const
asset
&
tpv
,
const
asset
&
cpv
,
const
asset
&
bpv
)
:
author
(
a
),
permlink
(
pl
),
payout
(
p
),
author_rewards
(
ar
),
total_payout_value
(
tpv
),
curator_payout_value
(
cpv
),
beneficiary_payout_value
(
bpv
)
{}
account_name_type
author
;
string
permlink
;
asset
payout
;
share_type
author_rewards
;
asset
total_payout_value
;
asset
curator_payout_value
;
asset
beneficiary_payout_value
;
};
...
...
@@ -256,7 +261,7 @@ namespace hive { namespace protocol {
FC_REFLECT
(
hive
::
protocol
::
author_reward_operation
,
(
author
)(
permlink
)(
hbd_payout
)(
hive_payout
)(
vesting_payout
)
)
FC_REFLECT
(
hive
::
protocol
::
curation_reward_operation
,
(
curator
)(
reward
)(
comment_author
)(
comment_permlink
)
)
FC_REFLECT
(
hive
::
protocol
::
comment_reward_operation
,
(
author
)(
permlink
)(
payout
)(
author_rewards
)
)
FC_REFLECT
(
hive
::
protocol
::
comment_reward_operation
,
(
author
)(
permlink
)(
payout
)(
author_rewards
)
(
total_payout_value
)(
curator_payout_value
)(
beneficiary_payout_value
)
)
FC_REFLECT
(
hive
::
protocol
::
fill_convert_request_operation
,
(
owner
)(
requestid
)(
amount_in
)(
amount_out
)
)
FC_REFLECT
(
hive
::
protocol
::
liquidity_reward_operation
,
(
owner
)(
payout
)
)
FC_REFLECT
(
hive
::
protocol
::
interest_operation
,
(
owner
)(
interest
)
)
...
...
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