Keep pending dividend balance and distributed dividend balance objects around (with zero
balance) after payouts, they will probably be needed again.
This commit is contained in:
parent
b8e1165290
commit
60f7dd798f
1 changed files with 6 additions and 2 deletions
|
|
@ -964,7 +964,9 @@ void process_dividend_assets(database& db)
|
|||
#endif
|
||||
|
||||
++pending_balance_object_iter;
|
||||
db.remove(pending_balance_object);
|
||||
db.modify(pending_balance_object, [&]( pending_dividend_payout_balance_object& pending_balance ){
|
||||
pending_balance.pending_balance = 0;
|
||||
});
|
||||
}
|
||||
// we will always be left with the last holder's data, generate the virtual op for it now.
|
||||
if (last_holder_account_id)
|
||||
|
|
@ -1002,7 +1004,9 @@ void process_dividend_assets(database& db)
|
|||
asset(-distributed_balance_object.balance_at_last_maintenance_interval,
|
||||
distributed_balance_object.dividend_payout_asset_type));
|
||||
++distributed_balance_object_iter;
|
||||
db.remove(distributed_balance_object); // now they've been paid out, reset to zero
|
||||
db.modify(distributed_balance_object, [&]( distributed_dividend_balance_object& obj ){
|
||||
obj.balance_at_last_maintenance_interval = 0; // now they've been paid out, reset to zero
|
||||
});
|
||||
}
|
||||
|
||||
// now schedule the next payout time
|
||||
|
|
|
|||
Loading…
Reference in a new issue