Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Trigger Mananger. More...
#include <governance-classes.h>
Public Member Functions | |
CGovernanceTriggerManager () | |
Private Types | |
typedef std::map< uint256, CSuperblock_sptr > | trigger_m_t |
typedef trigger_m_t::iterator | trigger_m_it |
Private Member Functions | |
std::vector< CSuperblock_sptr > | GetActiveTriggers () |
Get Active Triggers. More... | |
bool | AddNewTrigger (uint256 nHash) |
Add Governance Object. More... | |
void | CleanAndRemove () |
Clean And Remove. More... | |
Private Attributes | |
trigger_m_t | mapTrigger |
Friends | |
class | CSuperblockManager |
class | CGovernanceManager |
Detailed Description
Trigger Mananger.
- Track governance objects which are triggers
- After triggers are activated and executed, they can be removed
Definition at line 29 of file governance-classes.h.
Member Typedef Documentation
◆ trigger_m_it
|
private |
Definition at line 36 of file governance-classes.h.
◆ trigger_m_t
|
private |
Definition at line 35 of file governance-classes.h.
Constructor & Destructor Documentation
◆ CGovernanceTriggerManager()
|
inline |
Definition at line 45 of file governance-classes.h.
Member Function Documentation
◆ AddNewTrigger()
|
private |
Add Governance Object.
Definition at line 97 of file governance-classes.cpp.
References AssertLockHeld(), CGovernanceManager::cs, base_blob< BITS >::GetHex(), BCLog::GOBJECT, governance, LogPrint, LogPrintf, mapTrigger, and SEEN_OBJECT_IS_VALID.
Referenced by CGovernanceManager::AddCachedTriggers(), and CGovernanceManager::AddGovernanceObject().
◆ CleanAndRemove()
|
private |
Clean And Remove.
Definition at line 133 of file governance-classes.cpp.
References AssertLockHeld(), CGovernanceManager::cs, CGovernanceManager::FindGovernanceObject(), GetAdjustedTime(), CGovernanceObject::GetDataAsPlainString(), CGovernanceObject::GetObjectType(), BCLog::GOBJECT, governance, GOVERNANCE_OBJECT_TRIGGER, LogPrint, mapTrigger, CGovernanceObject::PrepareDeletion(), SEEN_OBJECT_ERROR_INVALID, SEEN_OBJECT_EXECUTED, SEEN_OBJECT_IS_VALID, SEEN_OBJECT_UNKNOWN, and CGovernanceObject::SetExpired().
Referenced by CGovernanceManager::UpdateCachesAndClean().
◆ GetActiveTriggers()
|
private |
Get Active Triggers.
- Look through triggers and scan for active ones
- Return the triggers in a list
Definition at line 201 of file governance-classes.cpp.
References AssertLockHeld(), CGovernanceManager::cs, CGovernanceManager::FindGovernanceObject(), governance, and mapTrigger.
Referenced by CSuperblockManager::GetBestSuperblock(), and CSuperblockManager::IsSuperblockTriggered().
Friends And Related Function Documentation
◆ CGovernanceManager
|
friend |
Definition at line 32 of file governance-classes.h.
◆ CSuperblockManager
|
friend |
Definition at line 31 of file governance-classes.h.
Member Data Documentation
◆ mapTrigger
|
private |
Definition at line 38 of file governance-classes.h.
Referenced by AddNewTrigger(), CleanAndRemove(), and GetActiveTriggers().
The documentation for this class was generated from the following files:
- src/governance/governance-classes.h
- src/governance/governance-classes.cpp