Skip to content

Commit 1efd773

Browse files
committed
Remove non-DIP3 code path in CMasternodePayments::IsScheduled
This relies on mnInfo which is not present anymore as we directly use deterministicMNManager now.
1 parent 4c749b7 commit 1efd773

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

src/masternode-payments.cpp

+4-24
Original file line numberDiff line numberDiff line change
@@ -645,32 +645,12 @@ bool CMasternodePayments::IsScheduled(const CDeterministicMNCPtr& dmnIn, int nNo
645645
{
646646
LOCK(cs_mapMasternodeBlocks);
647647

648-
if (deterministicMNManager->IsDIP3Active()) {
649-
auto projectedPayees = deterministicMNManager->GetListAtChainTip().GetProjectedMNPayees(8);
650-
for (const auto &dmn : projectedPayees) {
651-
if (dmn->proTxHash == dmnIn->proTxHash) {
652-
return true;
653-
}
654-
}
655-
return false;
656-
}
657-
658-
if(!masternodeSync.IsMasternodeListSynced()) return false;
659-
660-
CScript mnpayee;
661-
mnpayee = GetScriptForDestination(mnInfo.keyIDCollateralAddress);
662-
663-
for(int64_t h = nCachedBlockHeight; h <= nCachedBlockHeight + 8; h++){
664-
if(h == nNotBlockHeight) continue;
665-
std::vector<CTxOut> voutMasternodePayments;
666-
if(GetBlockTxOuts(h, 0, voutMasternodePayments)) {
667-
for (const auto& txout : voutMasternodePayments) {
668-
if (txout.scriptPubKey == mnpayee)
669-
return true;
670-
}
648+
auto projectedPayees = deterministicMNManager->GetListAtChainTip().GetProjectedMNPayees(8);
649+
for (const auto &dmn : projectedPayees) {
650+
if (dmn->proTxHash == dmnIn->proTxHash) {
651+
return true;
671652
}
672653
}
673-
674654
return false;
675655
}
676656

0 commit comments

Comments
 (0)