Skip to content

Commit 3562045

Browse files
committed
chore: drop GOVSCRIPT_PROTO_VERSION checks
1 parent c5bfb57 commit 3562045

File tree

3 files changed

+1
-30
lines changed

3 files changed

+1
-30
lines changed

src/governance/governance.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,19 +1005,6 @@ MessageProcessingResult CGovernanceManager::SyncObjects(CNode& peer, CConnman& c
10051005
continue;
10061006
}
10071007

1008-
if (peer.nVersion < GOVSCRIPT_PROTO_VERSION && govobj.GetObjectType() == GovernanceObject::PROPOSAL) {
1009-
// We know this proposal is valid locally, otherwise we would not store it.
1010-
// But we don't want to relay it to pre-GOVSCRIPT_PROTO_VERSION peers if payment_address is p2sh
1011-
// because they won't accept it anyway and will simply ban us eventually.
1012-
CProposalValidator validator(govobj.GetDataAsHexString(), false /* no script */);
1013-
if (!validator.Validate(false /* ignore expiration */)) {
1014-
// The only way we could get here is when proposal is valid but payment_address is actually p2sh.
1015-
LogPrintf("CGovernanceManager::%s -- not syncing p2sh govobj to older node: %s, peer=%d\n", __func__,
1016-
strHash, peer.GetId());
1017-
continue;
1018-
}
1019-
}
1020-
10211008
// Push the inventory budget proposal message over to the other client
10221009
LogPrint(BCLog::GOBJECT, "CGovernanceManager::%s -- syncing govobj: %s, peer=%d\n", __func__, strHash, peer.GetId());
10231010
ret.m_inventory.emplace_back(MSG_GOVERNANCE_OBJECT, nHash);

src/governance/object.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -602,21 +602,8 @@ void CGovernanceObject::Relay(PeerManager& peerman, const CMasternodeSync& mn_sy
602602
return;
603603
}
604604

605-
int minProtoVersion = MIN_PEER_PROTO_VERSION;
606-
if (m_obj.type == GovernanceObject::PROPOSAL) {
607-
// We know this proposal is valid locally, otherwise we would not get to the point we should relay it.
608-
// But we don't want to relay it to pre-GOVSCRIPT_PROTO_VERSION peers if payment_address is p2sh
609-
// because they won't accept it anyway and will simply ban us eventually.
610-
CProposalValidator validator(GetDataAsHexString(), false /* no script */);
611-
if (!validator.Validate(false /* ignore expiration */)) {
612-
// The only way we could get here is when proposal is valid but payment_address is actually p2sh.
613-
LogPrint(BCLog::GOBJECT, "CGovernanceObject::Relay -- won't relay %s to older peers\n", GetHash().ToString());
614-
minProtoVersion = GOVSCRIPT_PROTO_VERSION;
615-
}
616-
}
617-
618605
CInv inv(MSG_GOVERNANCE_OBJECT, GetHash());
619-
peerman.RelayInv(inv, minProtoVersion);
606+
peerman.RelayInv(inv);
620607
}
621608

622609
void CGovernanceObject::UpdateSentinelVariables(const CDeterministicMNList& tip_mn_list)

src/version.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ static const int MIN_PEER_PROTO_VERSION = 70221;
2222
//! minimum proto version of masternode to accept in DKGs
2323
static const int MIN_MASTERNODE_PROTO_VERSION = 70238;
2424

25-
//! GOVSCRIPT was activated in this version
26-
static const int GOVSCRIPT_PROTO_VERSION = 70221;
27-
2825
//! ADDRV2 was introduced in this version
2926
static const int ADDRV2_PROTO_VERSION = 70223;
3027

0 commit comments

Comments
 (0)