Skip to content

Commit

Permalink
refactor: missing usage of MasternodePayments::PlatformShare
Browse files Browse the repository at this point in the history
  • Loading branch information
knst committed Aug 31, 2023
1 parent fadd425 commit 9700eb9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/evo/creditpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
#include <memory>
#include <stack>

// Forward declaration to prevent a new circular dependencies through masternode/payments.h
namespace MasternodePayments {
CAmount PlatformShare(const CAmount masternodeReward);
} // namespace MasternodePayments

static const std::string DB_CREDITPOOL_SNAPSHOT = "cpm_S";

std::unique_ptr<CCreditPoolManager> creditPoolManager;
Expand Down Expand Up @@ -241,7 +246,7 @@ bool CCreditPoolDiff::SetTarget(const CTransaction& tx, TxValidationState& state
for (const CTxOut& txout : tx.vout) {
blockReward += txout.nValue;
}
masternodeReward = 0.375 * GetMasternodePayment(cbTx.nHeight, blockReward, params.BRRHeight);
masternodeReward = MasternodePayments::PlatformShare(GetMasternodePayment(cbTx.nHeight, blockReward, params.BRRHeight));
LogPrintf("CreditPool: set target to %lld with MN reward %lld\n", *targetBalance, masternodeReward);

return true;
Expand Down

0 comments on commit 9700eb9

Please sign in to comment.