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

Commit

Permalink
Set withdrawn and to_withdraw values to 0 when withdraw stops #971
Browse files Browse the repository at this point in the history
  • Loading branch information
e-schepachev committed Oct 23, 2018
1 parent 096f806 commit 51014f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,8 @@ namespace golos { namespace chain {
if (a.withdrawn >= a.to_withdraw || a.vesting_shares.amount == 0) {
a.vesting_withdraw_rate.amount = 0;
a.next_vesting_withdrawal = fc::time_point_sec::maximum();
a.withdrawn = 0;
a.to_withdraw = 0;
} else {
a.next_vesting_withdrawal += fc::seconds(STEEMIT_VESTING_WITHDRAW_INTERVAL_SECONDS);
}
Expand Down
2 changes: 2 additions & 0 deletions libraries/chain/steem_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,8 @@ namespace golos { namespace chain {
_db.modify(account, [&](account_object &a) {
a.vesting_withdraw_rate.amount = 0;
a.next_vesting_withdrawal = fc::time_point_sec::maximum();
a.withdrawn = 0;
a.to_withdraw = 0;
});
}

Expand Down

0 comments on commit 51014f7

Please sign in to comment.