Commit 3a7d4809 authored by Andrzej Lisak's avatar Andrzej Lisak

[ABW]: [Fix] mix of claim_reward_balance_operation and conversion from vests...

[ABW]: [Fix] mix of claim_reward_balance_operation and conversion from vests to steem cancel out their influence on gpo.total_*; also avoid actual conversion back and forth
parent 24d2be49
......@@ -5489,17 +5489,15 @@ void database::apply_hardfork( uint32_t hardfork )
adjust_balance( treasury_account, account.reward_sbd_balance );
adjust_reward_balance( account, -account.reward_sbd_balance );
auto converted_reward_vests = account.reward_vesting_balance * cprops.get_vesting_share_price();
adjust_balance( treasury_account, asset( converted_reward_vests, STEEM_SYMBOL ) );
// Convert and transfer vesting rewards
adjust_balance( treasury_account, account.reward_vesting_steem );
total_converted_vests += account.reward_vesting_balance;
total_steem_from_vests += asset( converted_reward_vests, STEEM_SYMBOL );
total_steem_from_vests += account.reward_vesting_steem;
modify( get_dynamic_global_properties(), [&]( dynamic_global_property_object& gpo )
{
gpo.pending_rewarded_vesting_shares -= account.reward_vesting_balance;
gpo.pending_rewarded_vesting_steem -= account.reward_vesting_steem;
gpo.total_vesting_fund_steem += converted_reward_vests;
} );
modify( account, [&]( account_object &a ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment