PIVX Core  5.6.99
P2P Digital Currency
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CActiveDeterministicMasternodeManager Class Reference

#include <activemasternode.h>

Inheritance diagram for CActiveDeterministicMasternodeManager:
[legend]
Collaboration diagram for CActiveDeterministicMasternodeManager:
[legend]

Public Types

enum  masternode_state_t {
  MASTERNODE_WAITING_FOR_PROTX , MASTERNODE_POSE_BANNED , MASTERNODE_REMOVED , MASTERNODE_OPERATOR_KEY_CHANGED ,
  MASTERNODE_PROTX_IP_CHANGED , MASTERNODE_READY , MASTERNODE_ERROR
}
 

Public Member Functions

 ~CActiveDeterministicMasternodeManager () override=default
 
void UpdatedBlockTip (const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
 Notifies listeners when the block chain tip advances. More...
 
void Init (const CBlockIndex *pindexTip)
 
void Reset (masternode_state_t _state, const CBlockIndex *pindexTip)
 
OperationResult SetOperatorKey (const std::string &strMNOperatorPrivKey)
 
OperationResult GetOperatorKey (CBLSSecretKey &key, CDeterministicMNCPtr &dmn) const
 
const CBLSSecretKeyOperatorKey () const
 
void SetNullProTx ()
 
const uint256 GetProTx () const
 
const CActiveMasternodeInfoGetInfo () const
 
masternode_state_t GetState () const
 
std::string GetStatus () const
 
bool IsReady () const
 
- Public Member Functions inherited from CValidationInterface
virtual ~CValidationInterface ()=default
 
virtual void AcceptedBlockHeader (const CBlockIndex *pindexNew)
 

Static Public Member Functions

static bool IsValidNetAddr (const CService &addrIn)
 

Private Attributes

masternode_state_t state {MASTERNODE_WAITING_FOR_PROTX}
 
std::string strError
 
CActiveMasternodeInfo info
 

Additional Inherited Members

- Protected Member Functions inherited from CValidationInterface
virtual void TransactionAddedToMempool (const CTransactionRef &ptxn)
 Notifies listeners of a transaction having been added to mempool. More...
 
virtual void TransactionRemovedFromMempool (const CTransactionRef &ptx, MemPoolRemovalReason reason)
 Notifies listeners of a transaction leaving mempool. More...
 
virtual void BlockConnected (const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindex)
 Notifies listeners of a block being connected. More...
 
virtual void BlockDisconnected (const std::shared_ptr< const CBlock > &block, const uint256 &blockHash, int nBlockHeight, int64_t blockTime)
 Notifies listeners of a block being disconnected. More...
 
virtual void SetBestChain (const CBlockLocator &locator)
 Notifies listeners of the new active block chain on-disk. More...
 
virtual void ResendWalletTransactions (CConnman *connman)
 Tells listeners to broadcast their data. More...
 
virtual void BlockChecked (const CBlock &, const CValidationState &)
 
friend void ::RegisterSharedValidationInterface (std::shared_ptr< CValidationInterface >)
 
friend void ::UnregisterValidationInterface (CValidationInterface *)
 
friend void ::UnregisterAllValidationInterfaces ()
 
virtual void NotifyMasternodeListChanged (bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff)
 Notifies listeners of updated deterministic masternode list. More...
 

Detailed Description

Definition at line 36 of file activemasternode.h.

Member Enumeration Documentation

◆ masternode_state_t

Enumerator
MASTERNODE_WAITING_FOR_PROTX 
MASTERNODE_POSE_BANNED 
MASTERNODE_REMOVED 
MASTERNODE_OPERATOR_KEY_CHANGED 
MASTERNODE_PROTX_IP_CHANGED 
MASTERNODE_READY 
MASTERNODE_ERROR 

Definition at line 39 of file activemasternode.h.

Constructor & Destructor Documentation

◆ ~CActiveDeterministicMasternodeManager()

CActiveDeterministicMasternodeManager::~CActiveDeterministicMasternodeManager ( )
overridedefault

Member Function Documentation

◆ GetInfo()

const CActiveMasternodeInfo* CActiveDeterministicMasternodeManager::GetInfo ( ) const
inline

Definition at line 70 of file activemasternode.h.

Here is the caller graph for this function:

◆ GetOperatorKey()

OperationResult CActiveDeterministicMasternodeManager::GetOperatorKey ( CBLSSecretKey key,
CDeterministicMNCPtr dmn 
) const

Definition at line 82 of file activemasternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetProTx()

const uint256 CActiveDeterministicMasternodeManager::GetProTx ( ) const
inline

Definition at line 68 of file activemasternode.h.

Here is the caller graph for this function:

◆ GetState()

masternode_state_t CActiveDeterministicMasternodeManager::GetState ( ) const
inline

Definition at line 71 of file activemasternode.h.

Here is the caller graph for this function:

◆ GetStatus()

std::string CActiveDeterministicMasternodeManager::GetStatus ( ) const

Definition at line 51 of file activemasternode.cpp.

Here is the caller graph for this function:

◆ Init()

void CActiveDeterministicMasternodeManager::Init ( const CBlockIndex pindexTip)

Definition at line 99 of file activemasternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsReady()

bool CActiveDeterministicMasternodeManager::IsReady ( ) const
inline

Definition at line 73 of file activemasternode.h.

Here is the caller graph for this function:

◆ IsValidNetAddr()

bool CActiveDeterministicMasternodeManager::IsValidNetAddr ( const CService addrIn)
static
Todo:
: check IPv6 and TOR addresses

Definition at line 231 of file activemasternode.cpp.

Here is the call graph for this function:

◆ OperatorKey()

const CBLSSecretKey* CActiveDeterministicMasternodeManager::OperatorKey ( ) const
inline

Definition at line 66 of file activemasternode.h.

Here is the caller graph for this function:

◆ Reset()

void CActiveDeterministicMasternodeManager::Reset ( masternode_state_t  _state,
const CBlockIndex pindexTip 
)

Definition at line 181 of file activemasternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNullProTx()

void CActiveDeterministicMasternodeManager::SetNullProTx ( )
inline

Definition at line 67 of file activemasternode.h.

Here is the caller graph for this function:

◆ SetOperatorKey()

OperationResult CActiveDeterministicMasternodeManager::SetOperatorKey ( const std::string &  strMNOperatorPrivKey)

Definition at line 65 of file activemasternode.cpp.

Here is the caller graph for this function:

◆ UpdatedBlockTip()

void CActiveDeterministicMasternodeManager::UpdatedBlockTip ( const CBlockIndex pindexNew,
const CBlockIndex pindexFork,
bool  fInitialDownload 
)
overridevirtual

Notifies listeners when the block chain tip advances.

When multiple blocks are connected at once, UpdatedBlockTip will be called on the final tip but may not be called on every intermediate tip. If the latter behavior is desired, subscribe to BlockConnected() instead.

Called on a background thread.

Reimplemented from CValidationInterface.

Definition at line 189 of file activemasternode.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ info

CActiveMasternodeInfo CActiveDeterministicMasternodeManager::info
private

Definition at line 52 of file activemasternode.h.

◆ state

masternode_state_t CActiveDeterministicMasternodeManager::state {MASTERNODE_WAITING_FOR_PROTX}
private

Definition at line 50 of file activemasternode.h.

◆ strError

std::string CActiveDeterministicMasternodeManager::strError
private

Definition at line 51 of file activemasternode.h.


The documentation for this class was generated from the following files: