@@ -984,6 +984,12 @@ MessageProcessingResult CGovernanceManager::SyncObjects(CNode& peer, CConnman& c
984984 }
985985 m_netfulfilledman.AddFulfilledRequest (peer.addr , NetMsgType::MNGOVERNANCESYNC);
986986
987+ if (peer.nVersion < GOVSCRIPT_PROTO_VERSION) {
988+ LogPrintf (" CGovernanceManager::%s -- peer=%d does not support p2sh govobj, skipping sync\n " , __func__,
989+ peer.GetId ());
990+ return {};
991+ }
992+
987993 // SYNC GOVERNANCE OBJECTS WITH OTHER CLIENT
988994
989995 LogPrint (BCLog::GOBJECT, " CGovernanceManager::%s -- syncing all objects to peer=%d\n " , __func__, peer.GetId ());
@@ -1005,19 +1011,6 @@ MessageProcessingResult CGovernanceManager::SyncObjects(CNode& peer, CConnman& c
10051011 continue ;
10061012 }
10071013
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-
10211014 // Push the inventory budget proposal message over to the other client
10221015 LogPrint (BCLog::GOBJECT, " CGovernanceManager::%s -- syncing govobj: %s, peer=%d\n " , __func__, strHash, peer.GetId ());
10231016 ret.m_inventory .emplace_back (MSG_GOVERNANCE_OBJECT, nHash);
0 commit comments