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_sptrtrigger_m_t
 
typedef trigger_m_t::iterator trigger_m_it
 

Private Member Functions

std::vector< CSuperblock_sptrGetActiveTriggers ()
 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

typedef trigger_m_t::iterator CGovernanceTriggerManager::trigger_m_it
private

Definition at line 36 of file governance-classes.h.

◆ trigger_m_t

Definition at line 35 of file governance-classes.h.

Constructor & Destructor Documentation

◆ CGovernanceTriggerManager()

CGovernanceTriggerManager::CGovernanceTriggerManager ( )
inline

Definition at line 45 of file governance-classes.h.

Member Function Documentation

◆ AddNewTrigger()

bool CGovernanceTriggerManager::AddNewTrigger ( uint256  nHash)
private

◆ CleanAndRemove()

◆ GetActiveTriggers()

std::vector< CSuperblock_sptr > CGovernanceTriggerManager::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 class CGovernanceManager
friend

Definition at line 32 of file governance-classes.h.

◆ CSuperblockManager

friend class CSuperblockManager
friend

Definition at line 31 of file governance-classes.h.

Member Data Documentation

◆ mapTrigger

trigger_m_t CGovernanceTriggerManager::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:
Released under the MIT license