Skip to content

Commit

Permalink
added information explaining cached variable meanings
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Duffield committed Jun 9, 2016
1 parent 98b7d29 commit 581b46a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/governance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,7 @@ void CGovernanceManager::ProcessMessage(CNode* pfrom, std::string& strCommand, C
// UPDATE CACHED VARIABLES FOR THIS OBJECT AND ADD IT TO OUR MANANGED DATA

govobj.UpdateSentinelVariables(pCurrentBlockIndex);
if(AddGovernanceObject(govobj))
{
govobj.Relay();
}
if(AddGovernanceObject(govobj)) govobj.Relay();

mapSeenGovernanceObjects.insert(make_pair(govobj.GetHash(), SEEN_OBJECT_IS_VALID));
masternodeSync.AddedBudgetItem(govobj.GetHash());
Expand Down
10 changes: 5 additions & 5 deletions src/governance.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ class CGovernanceObject
std::string strLocalValidityError;

// set via sentinel voting mechanisms
// caching -- one per voting mechanism -- see governance-vote.h for more information
bool fCachedFunding;
bool fCachedValid;
bool fCachedDelete;
bool fCachedEndorsed;
// caching -- one per voting mechanism -- see below for more information
bool fCachedFunding; // true == minimum network support has been reached for this object to be funded (doesn't mean it will for sure though)
bool fCachedValid; // true == minimum network has been reached flagging this object as a valid and understood goverance object (e.g, the serialized data is correct format, etc)
bool fCachedDelete; // true == minimum network support has been reached saying this object should be deleted from the system entirely
bool fCachedEndorsed; // true == minimum network support has been reached flagging this object as endorsed by an elected representative body (e.g. business review board / technecial review board /etc)

CGovernanceObject();
CGovernanceObject(uint256 nHashParentIn, int nRevisionIn, std::string strNameIn, int64_t nTime, uint256 nFeeTXHashIn);
Expand Down

0 comments on commit 581b46a

Please sign in to comment.