diff --git a/src/governance/object.cpp b/src/governance/object.cpp index c176b2196b..a41fb48d00 100644 --- a/src/governance/object.cpp +++ b/src/governance/object.cpp @@ -22,41 +22,16 @@ #include -CGovernanceObject::CGovernanceObject() : - cs(), - m_obj{}, - nDeletionTime(0), - fCachedLocalValidity(false), - strLocalValidityError(), - fCachedFunding(false), - fCachedValid(true), - fCachedDelete(false), - fCachedEndorsed(false), - fDirtyCache(true), - fExpired(false), - fUnparsable(false), - mapCurrentMNVotes(), - fileVotes() +CGovernanceObject::CGovernanceObject() { // PARSE JSON DATA STORAGE (VCHDATA) LoadData(); } -CGovernanceObject::CGovernanceObject(const uint256& nHashParentIn, int nRevisionIn, int64_t nTimeIn, const uint256& nCollateralHashIn, const std::string& strDataHexIn) : +CGovernanceObject::CGovernanceObject(const uint256& nHashParentIn, int nRevisionIn, int64_t nTimeIn, + const uint256& nCollateralHashIn, const std::string& strDataHexIn) : cs(), - m_obj{nHashParentIn, nRevisionIn, nTimeIn, nCollateralHashIn, strDataHexIn}, - nDeletionTime(0), - fCachedLocalValidity(false), - strLocalValidityError(), - fCachedFunding(false), - fCachedValid(true), - fCachedDelete(false), - fCachedEndorsed(false), - fDirtyCache(true), - fExpired(false), - fUnparsable(false), - mapCurrentMNVotes(), - fileVotes() + m_obj{nHashParentIn, nRevisionIn, nTimeIn, nCollateralHashIn, strDataHexIn} { // PARSE JSON DATA STORAGE (VCHDATA) LoadData(); diff --git a/src/governance/object.h b/src/governance/object.h index 6cfea6eb50..826823a33b 100644 --- a/src/governance/object.h +++ b/src/governance/object.h @@ -103,37 +103,37 @@ private: Governance::Object m_obj; /// time this object was marked for deletion - int64_t nDeletionTime; + int64_t nDeletionTime{0}; /// is valid by blockchain - bool fCachedLocalValidity; + bool fCachedLocalValidity{false}; std::string strLocalValidityError; // VARIOUS FLAGS FOR OBJECT / SET VIA MASTERNODE VOTING /// true == minimum network support has been reached for this object to be funded (doesn't mean it will for sure though) - bool fCachedFunding; + bool fCachedFunding{false}; /// true == minimum network has been reached flagging this object as a valid and understood governance object (e.g, the serialized data is correct format, etc) - bool fCachedValid; + bool fCachedValid{true}; /// true == minimum network support has been reached saying this object should be deleted from the system entirely - bool fCachedDelete; + bool fCachedDelete{false}; /** true == minimum network support has been reached flagging this object as endorsed by an elected representative body * (e.g. business review board / technical review board /etc) */ - bool fCachedEndorsed; + bool fCachedEndorsed{false}; /// object was updated and cached values should be updated soon - bool fDirtyCache; + bool fDirtyCache{true}; /// Object is no longer of interest - bool fExpired; + bool fExpired{false}; /// Failed to parse object data - bool fUnparsable; + bool fUnparsable{false}; vote_m_t mapCurrentMNVotes;