Skip to content

Commit

Permalink
Fix for future swap owner rewards calc (#1293)
Browse files Browse the repository at this point in the history
* Fix for future swap owner rewards calc

* Add fork condition

* Update mn_checks.cpp
  • Loading branch information
prasannavl authored May 26, 2022
1 parent 13b33b4 commit 4d373ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/masternodes/mn_checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,12 @@ class CCustomTxApplyVisitor : public CCustomTxVisitor
CDataStructureV0 liveKey{AttributeTypes::Live, ParamIDs::Economy, EconomyKeys::DFIP2203Current};
auto balances = attributes->GetValue(liveKey, CBalances{});

// Can be removed after the hard fork, since it will be backward compatible
// but have to keep it around for pre 2.8.0 nodes for now
if (height >= static_cast<uint32_t>(consensus.FortCanningCrunchHeight)) {
CalculateOwnerRewards(obj.owner);
}

if (obj.withdraw) {
std::map<CFuturesUserKey, CFuturesUserValue> userFuturesValues;

Expand Down

0 comments on commit 4d373ea

Please sign in to comment.