Skip to content

Commit

Permalink
Remove MN upgrade check in ComputeBlockVersion
Browse files Browse the repository at this point in the history
Has to be replaced with something new in the future.
  • Loading branch information
codablock committed Dec 31, 2018
1 parent 71a6951 commit 17c792c
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1828,35 +1828,7 @@ int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Para
ThresholdState state = VersionBitsState(pindexPrev, params, pos, versionbitscache);
const struct BIP9DeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
if (vbinfo.check_mn_protocol && state == THRESHOLD_STARTED && fCheckMasternodesUpgraded) {
if (deterministicMNManager->IsDIP3Active()) {
auto mnList = deterministicMNManager->GetListForBlock(pindexPrev->GetBlockHash());
auto payee = mnList.GetMNPayee();
if (!payee) {
continue;
}
} else {
std::vector<CTxOut> voutMasternodePayments;
masternode_info_t mnInfo;
if (!mnpayments.GetBlockTxOuts(pindexPrev->nHeight + 1, 0, voutMasternodePayments)) {
// no votes for this block
continue;
}
bool mnKnown = false;
for (const auto& txout : voutMasternodePayments) {
if (mnodeman.GetMasternodeInfo(txout.scriptPubKey, mnInfo)) {
mnKnown = true;
break;
}
}
if (!mnKnown) {
// unknown masternode
continue;
}
if (mnInfo.nProtocolVersion < DMN_PROTO_VERSION) {
// masternode is not upgraded yet
continue;
}
}
// TODO implement new logic for MN upgrade checks (e.g. with LLMQ based feature/version voting)
}
if (state == THRESHOLD_LOCKED_IN || state == THRESHOLD_STARTED) {
nVersion |= VersionBitsMask(params, (Consensus::DeploymentPos)i);
Expand Down

0 comments on commit 17c792c

Please sign in to comment.