Skip to content

Commit

Permalink
Implement deterministic version of CMasternodePayments::IsScheduled
Browse files Browse the repository at this point in the history
Needed for privatesend when choosing masternodes
  • Loading branch information
codablock committed Sep 5, 2018
1 parent 44706dc commit 2c481f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/masternode-payments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,16 @@ bool CMasternodePayments::IsScheduled(const masternode_info_t& mnInfo, int nNotB
{
LOCK(cs_mapMasternodeBlocks);

if (deterministicMNManager->IsDeterministicMNsSporkActive()) {
auto projectedPayees = deterministicMNManager->GetListAtChainTip().GetProjectedMNPayees(8);
for (const auto &dmn : projectedPayees) {
if (dmn->proTxHash == mnInfo.outpoint.hash) {
return true;
}
}
return false;
}

if(!masternodeSync.IsMasternodeListSynced()) return false;

CScript mnpayee;
Expand Down

0 comments on commit 2c481f0

Please sign in to comment.