Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Do not promote highest after-auction curator with auction rewards #1356
Browse files Browse the repository at this point in the history
  • Loading branch information
maslenitsa93 committed Jul 24, 2019
1 parent d5aadc9 commit fe3dc7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2430,6 +2430,10 @@ namespace golos { namespace chain {
for (auto itr = c.vote_list.begin(); c.vote_list.end() != itr; ++itr) {
uint128_t weight(itr->weight);
uint64_t claim = ((max_rewards.value * weight) / total_weight).to_uint64();
if (has_hardfork(STEEMIT_HARDFORK_0_22__1014)) {
claim -= (uint128_t(claim) * (*itr->vote).author_promote_rate / STEEMIT_100_PERCENT).to_uint64();
}

// to_curators case
if (c.comment.auction_window_reward_destination == protocol::to_curators &&
itr->vote->auction_time == c.comment.auction_window_size
Expand All @@ -2446,9 +2450,6 @@ namespace golos { namespace chain {
}

if (claim > 0) { // min_amt is non-zero satoshis
if (has_hardfork(STEEMIT_HARDFORK_0_22__1014)) {
claim -= (uint128_t(claim) * (*itr->vote).author_promote_rate / STEEMIT_100_PERCENT).to_uint64();
}
unclaimed_rewards -= claim;
actual_rewards += pay_curator(*itr->vote, claim, c.comment.author, to_string(c.comment.permlink));
} else {
Expand Down

0 comments on commit fe3dc7f

Please sign in to comment.