Skip to content

Commit

Permalink
Calculate owner rewards for futures (#1201)
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Fieroni <[email protected]>
  • Loading branch information
bvbfan authored May 7, 2022
1 parent d3cc5e3 commit ff55056
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/masternodes/consensus/smartcontracts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ Res CSmartContractsConsensus::operator()(const CFutureSwapMessage& obj) const {
if (!res)
return res;
} else {
// some txs might be rejected due to not enough owner amount
if (static_cast<int>(height) >= consensus.GreatWorldHeight)
CalculateOwnerRewards(obj.owner);

auto res = TransferTokenBalance(obj.source.nTokenId, obj.source.nValue, obj.owner, *contractAddressValue);
if (!res)
return res;
Expand Down

0 comments on commit ff55056

Please sign in to comment.