Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
governance.h
Go to the documentation of this file.
291 void SyncSingleObjVotes(CNode* pnode, const uint256& nProp, const CBloomFilter& filter, CConnman& connman);
294 void ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, CConnman& connman);
301 std::vector<CGovernanceVote> GetCurrentVotes(const uint256& nParentHash, const COutPoint& mnCollateralOutpointFilter) const;
379 bool MasternodeRateCheck(const CGovernanceObject& govobj, bool fUpdateFailStatus, bool fForce, bool& fRateCheckBypassed);
381 bool ProcessVoteAndRelay(const CGovernanceVote& vote, CGovernanceException& exception, CConnman& connman)
404 void RequestGovernanceObject(CNode* pfrom, const uint256& nHash, CConnman& connman, bool fUseFilter = false);
411 bool ProcessVote(CNode* pfrom, const CGovernanceVote& vote, CGovernanceException& exception, CConnman& connman);
421 void CheckOrphanVotes(CGovernanceObject& govobj, CGovernanceException& exception, CConnman& connman);
void SyncSingleObjVotes(CNode *pnode, const uint256 &nProp, const CBloomFilter &filter, CConnman &connman)
Definition: governance.cpp:615
CacheMultiMap< uint256, vote_time_pair_t > vote_cmm_t
Definition: governance.h:193
std::map< COutPoint, last_object_rec > txout_m_t
Definition: governance.h:197
void MasternodeRateUpdate(const CGovernanceObject &govobj)
Definition: governance.cpp:711
bool MasternodeRateCheck(const CGovernanceObject &govobj, bool fUpdateFailStatus=false)
Definition: governance.cpp:733
CRateCheckBuffer triggerBuffer
Definition: governance.h:172
bool HaveVoteForHash(const uint256 &nHash) const
Definition: governance.cpp:66
ADD_SERIALIZE_METHODS
Definition: governance.h:163
Definition: governance-vote.h:54
CDeterministicMNList lastMNListForVotingKeys
Definition: governance.h:254
static bool AcceptMessage(const uint256 &nHash, hash_s_t &setHash)
Definition: governance.cpp:1085
BloomFilter is a probabilistic filter which SPV clients provide so that we can filter the transaction...
Definition: bloom.h:46
Definition: univalue.h:20
std::pair< CGovernanceObject, ExpirationInfo > object_info_pair_t
Definition: governance.h:39
bool ProcessVoteAndRelay(const CGovernanceVote &vote, CGovernanceException &exception, CConnman &connman)
Definition: governance.h:381
bool HaveObjectForHash(const uint256 &nHash) const
Definition: governance.cpp:47
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:103
bool ProcessVote(CNode *pfrom, const CGovernanceVote &vote, CGovernanceException &exception, CConnman &connman)
Definition: governance.cpp:803
CacheMap< uint256, CGovernanceObject * > object_ref_cm_t
Definition: governance.h:183
void SerializationOp(Stream &s, Operation ser_action)
Definition: governance.h:329
std::map< uint256, CGovernanceObject > object_m_t
Definition: governance.h:177
void AddPostponedObject(const CGovernanceObject &govobj)
Definition: governance.h:369
CGovernanceObject * FindGovernanceObject(const uint256 &nHash)
Definition: governance.cpp:463
ExpirationInfo(int64_t _nExpirationTime, int _idFrom)
Definition: governance.h:32
std::map< uint256, object_info_pair_t > object_info_m_t
Definition: governance.h:207
int GetCachedBlockHeight() const
Definition: governance.h:356
Definition: deterministicmns.h:288
void AddGovernanceObject(CGovernanceObject &govobj, CConnman &connman, CNode *pfrom=nullptr)
Definition: governance.cpp:291
void RequestGovernanceObject(CNode *pfrom, const uint256 &nHash, CConnman &connman, bool fUseFilter=false)
Definition: governance.cpp:922
void CheckPostponedObjects(CConnman &connman)
Definition: governance.cpp:857
Definition: governance.h:151
static const std::string SERIALIZATION_VERSION_STRING
Definition: governance.h:218
int RequestGovernanceObjectVotes(CNode *pnode, CConnman &connman)
Definition: governance.cpp:959
void RequestOrphanObjects(CConnman &connman)
Definition: governance.cpp:1222
txout_m_t mapLastMasternodeObject
Definition: governance.h:245
Definition: util.h:134
std::map< uint256, CGovernanceVote > vote_m_t
Definition: governance.h:185
void ProcessMessage(CNode *pfrom, const std::string &strCommand, CDataStream &vRecv, CConnman &connman)
Definition: governance.cpp:88
object_info_m_t::iterator object_info_m_it
Definition: governance.h:209
static const int RELIABLE_PROPAGATION_TIME
Definition: governance.h:221
A class which encapsulates information about a governance exception condition.
Definition: governance-exceptions.h:55
Definition: governance.h:31
std::vector< const CGovernanceObject * > GetAllNewerThan(int64_t nMoreThanTime) const
Definition: governance.cpp:516
bool SerializeObjectForHash(const uint256 &nHash, CDataStream &ss) const
Definition: governance.cpp:53
void CheckOrphanVotes(CGovernanceObject &govobj, CGovernanceException &exception, CConnman &connman)
Definition: governance.cpp:266
bool ConfirmInventoryRequest(const CInv &inv)
This is called by AlreadyHave in net_processing.cpp as part of the inventory retrieval process...
Definition: governance.cpp:562
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:26
bool AcceptVoteMessage(const uint256 &nHash)
Called to indicate a requested vote has been received.
Definition: governance.cpp:1079
std::vector< CGovernanceVote > GetCurrentVotes(const uint256 &nParentHash, const COutPoint &mnCollateralOutpointFilter) const
Definition: governance.cpp:472
static const int MAX_TIME_FUTURE_DEVIATION
Definition: governance.h:220
void UpdatedBlockTip(const CBlockIndex *pindex, CConnman &connman)
Definition: governance.cpp:1199
bool SerializeVoteForHash(const uint256 &nHash, CDataStream &ss) const
Definition: governance.cpp:80
void SerializationOp(Stream &s, Operation ser_action)
Definition: governance.h:139
ScopedLockBool(CCriticalSection &_cs, bool &_ref, bool _value)
Definition: governance.h:262
hash_s_t setAdditionalRelayObjects
Definition: governance.h:237
void SyncObjects(CNode *pnode, CConnman &connman) const
Definition: governance.cpp:664
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
CacheMap< uint256, CGovernanceVote > vote_cm_t
Definition: governance.h:191
hash_time_m_t::iterator hash_time_m_it
Definition: governance.h:213
hash_time_m_t mapErasedGovernanceObjects
Definition: governance.h:234
last_object_rec(bool fStatusOKIn=true)
Definition: governance.h:157
Definition: governance.h:43
void SerializationOp(Stream &s, Operation ser_action)
Definition: governance.h:166
bool AreRateChecksEnabled() const
Definition: governance.h:392
AssertLockHeld(g_cs_orphans)
std::map< uint256, int64_t > hash_time_m_t
Definition: governance.h:211
void AddInvalidVote(const CGovernanceVote &vote)
Definition: governance.h:406
Wrapped mutex: supports recursive locking, but no waiting TODO: We should move away from using the re...
Definition: sync.h:94
void UpdateLastDiffTime(int64_t nTimeIn)
Definition: governance.h:354
bool AcceptObjectMessage(const uint256 &nHash)
Called to indicate a requested object has been received.
Definition: governance.cpp:1073
void DoMaintenance(CConnman &connman)
Definition: governance.cpp:547