Skip to content

Commit

Permalink
Update API to work with old and new reward accounting mechanisms. ste…
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Vandeberg committed Feb 27, 2017
1 parent e5aad0e commit db378d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/app/database_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,8 @@ void database_api::set_pending_payout( discussion& d )const
u256 total_r2 = to256( props.total_reward_shares2 );

if( props.total_reward_shares2 > 0 ){
auto vshares = steemit::chain::util::calculate_claims( d.net_rshares.value > 0 ? d.net_rshares.value : 0 );
auto vshares = std::max( steemit::chain::util::calculate_claims( d.net_rshares.value > 0 ? d.net_rshares.value : 0 ),
steemit::chain::util::calculate_claims( d.net_rshares.value > 0 ? d.net_rshares.value : 0 , my->_db.get_reward_fund( my->_db.get_comment( d.author, d.permlink ) ) ) ); // TODO: Only return new calculate_claims after HF 17

//int64_t abs_net_rshares = llabs(d.net_rshares.value);

Expand Down

0 comments on commit db378d8

Please sign in to comment.