Ensure governance objects are still valid before relaying
This commit is contained in:
parent
6deb3a65a3
commit
c4c4f1dad7
@ -551,7 +551,10 @@ void CGovernanceManager::Sync(CNode* pfrom, uint256 nProp)
|
|||||||
|
|
||||||
CGovernanceObject& govobj = it->second;
|
CGovernanceObject& govobj = it->second;
|
||||||
|
|
||||||
if(govobj.IsSetCachedValid() && (nProp == uint256() || h == nProp)) {
|
std::string strError;
|
||||||
|
if(govobj.IsSetCachedValid() &&
|
||||||
|
(nProp == uint256() || h == nProp) &&
|
||||||
|
govobj.IsValidLocally(pCurrentBlockIndex, strError, true)) {
|
||||||
// Push the inventory budget proposal message over to the other client
|
// Push the inventory budget proposal message over to the other client
|
||||||
pfrom->PushInventory(CInv(MSG_GOVERNANCE_OBJECT, h));
|
pfrom->PushInventory(CInv(MSG_GOVERNANCE_OBJECT, h));
|
||||||
++nInvCount;
|
++nInvCount;
|
||||||
|
Loading…
Reference in New Issue
Block a user