Implement deterministic version of CMasternodePayments::IsScheduled

Needed for privatesend when choosing masternodes
This commit is contained in:
Alexander Block 2018-03-09 12:46:27 +01:00
parent 44706dc88a
commit 2c481f0f86

View File

@ -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;