votehf
6 лет назадAdd comment_rewards object in the `social_network`-plugin
There are 4 non-consesus fields about rewards in the comment_object
which are used only for API objects:
- author_rewards
- total_payout_value
- beneficiary_payout_value
- curator_payout_value
To minimize memory usage for small nodes the following steps should be done:
- [x] Create a new structure
comment_reward_object
in thesocial_network
-plugin with fields: - comment (comment_object_id_type)
- total_payout_value (total in GBG)
- author_rewards (total in GOLOS)
- author_gbg_payout_value (part in GBG)
- author_golos_payout_value (part in GOLOS)
- author_gests_payout_value (part in GESTS)
- beneficiary_payout_value (GBG)
- beneficiary_gests_payout_value (GESTS)
- curator_payout_value (GBG)
- curator_gests_payout_value (GESTS)
- [x] Extend the
author_reward_operation
with the fieldauthor_rewards
- [x] Add initialization of
comment_reward_object
from theauthor_reward_operation
- [x] Add initialization of rewards information in API objects from the
comment_reward_object
- [x] Remove initialization of rewards fields from the
database::cashout_comment_helper
- [x] Remove 4 fields with rewards from the
comment_object
- [x] Add information about GETS, GOLOS, GBG pending parts in the
discussion_helper::set_pending_payout
- [x] Add configuration flag
store-comment-rewards
in thesocial_network
-plugin. Default value istrue
. - [x] Fix unit-tests