File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class CGovernanceVote;
2525
2626static const int MIN_GOVERNANCE_PEER_PROTO_VERSION = 70213 ;
2727static const int GOVERNANCE_FILTER_PROTO_VERSION = 70206 ;
28+ static const int GOVERNANCE_POSE_BANNED_VOTES_VERSION = 70215 ;
2829
2930static const double GOVERNANCE_FILTER_FP_RATE = 0.001 ;
3031
Original file line number Diff line number Diff line change @@ -120,8 +120,21 @@ void CGovernanceVote::Relay(CConnman& connman) const
120120 return ;
121121 }
122122
123+ auto mnList = deterministicMNManager->GetListAtChainTip ();
124+ auto dmn = mnList.GetMNByCollateral (masternodeOutpoint);
125+ if (!dmn) {
126+ return ;
127+ }
128+
129+ // When this vote is from non-valid (PoSe banned) MN, we should only announce it to v0.14.0.1 nodes as older nodes
130+ // will ban us otherwise.
131+ int minVersion = MIN_GOVERNANCE_PEER_PROTO_VERSION;
132+ if (!mnList.IsMNValid (dmn)) {
133+ minVersion = GOVERNANCE_POSE_BANNED_VOTES_VERSION;
134+ }
135+
123136 CInv inv (MSG_GOVERNANCE_OBJECT_VOTE, GetHash ());
124- connman.RelayInv (inv, MIN_GOVERNANCE_PEER_PROTO_VERSION );
137+ connman.RelayInv (inv, minVersion );
125138}
126139
127140void CGovernanceVote::UpdateHash () const
You can’t perform that action at this time.
0 commit comments