Remove MN upgrade check in ComputeBlockVersion
Has to be replaced with something new in the future.
This commit is contained in:
parent
71a6951008
commit
17c792cd3b
@ -1828,35 +1828,7 @@ int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Para
|
|||||||
ThresholdState state = VersionBitsState(pindexPrev, params, pos, versionbitscache);
|
ThresholdState state = VersionBitsState(pindexPrev, params, pos, versionbitscache);
|
||||||
const struct BIP9DeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
|
const struct BIP9DeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
|
||||||
if (vbinfo.check_mn_protocol && state == THRESHOLD_STARTED && fCheckMasternodesUpgraded) {
|
if (vbinfo.check_mn_protocol && state == THRESHOLD_STARTED && fCheckMasternodesUpgraded) {
|
||||||
if (deterministicMNManager->IsDIP3Active()) {
|
// TODO implement new logic for MN upgrade checks (e.g. with LLMQ based feature/version voting)
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (state == THRESHOLD_LOCKED_IN || state == THRESHOLD_STARTED) {
|
if (state == THRESHOLD_LOCKED_IN || state == THRESHOLD_STARTED) {
|
||||||
nVersion |= VersionBitsMask(params, (Consensus::DeploymentPos)i);
|
nVersion |= VersionBitsMask(params, (Consensus::DeploymentPos)i);
|
||||||
|
Loading…
Reference in New Issue
Block a user