Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

CMasternodeSync Class Reference

#include <masternode-sync.h>

Public Member Functions

 CMasternodeSync ()
 
void SendGovernanceSyncRequest (CNode *pnode, CConnman &connman)
 
bool IsBlockchainSynced ()
 
bool IsSynced ()
 
int GetAssetID ()
 
int GetAttempt ()
 
void BumpAssetLastTime (const std::string &strFuncName)
 
int64_t GetAssetStartTime ()
 
std::string GetAssetName ()
 
std::string GetSyncStatus ()
 
void Reset (bool fForce=false, bool fNotifyReset=true)
 
void SwitchToNextAsset (CConnman &connman)
 
void ProcessMessage (CNode *pfrom, const std::string &strCommand, CDataStream &vRecv)
 
void ProcessTick (CConnman &connman)
 
void AcceptedBlockHeader (const CBlockIndex *pindexNew)
 
void NotifyHeaderTip (const CBlockIndex *pindexNew, bool fInitialDownload, CConnman &connman)
 
void UpdatedBlockTip (const CBlockIndex *pindexNew, bool fInitialDownload, CConnman &connman)
 
void DoMaintenance (CConnman &connman)
 

Private Attributes

int nCurrentAsset
 
int nTriedPeerCount
 
int64_t nTimeAssetSyncStarted
 
int64_t nTimeLastBumped
 
bool fReachedBestHeader {false}
 Set to true if best header is reached in CMasternodeSync::UpdatedBlockTip. More...
 
int64_t nTimeLastUpdateBlockTip {0}
 Last time UpdateBlockTip has been called. More...
 

Detailed Description

Definition at line 28 of file masternode-sync.h.

Constructor & Destructor Documentation

◆ CMasternodeSync()

CMasternodeSync::CMasternodeSync ( )
inline

Definition at line 47 of file masternode-sync.h.

References Reset().

Member Function Documentation

◆ AcceptedBlockHeader()

void CMasternodeSync::AcceptedBlockHeader ( const CBlockIndex pindexNew)

◆ BumpAssetLastTime()

void CMasternodeSync::BumpAssetLastTime ( const std::string &  strFuncName)

◆ DoMaintenance()

void CMasternodeSync::DoMaintenance ( CConnman connman)

Definition at line 371 of file masternode-sync.cpp.

References ProcessTick(), and ShutdownRequested().

Referenced by AppInitMain().

◆ GetAssetID()

int CMasternodeSync::GetAssetID ( )
inline

Definition at line 55 of file masternode-sync.h.

References nCurrentAsset.

Referenced by mnsync().

◆ GetAssetName()

std::string CMasternodeSync::GetAssetName ( )

◆ GetAssetStartTime()

int64_t CMasternodeSync::GetAssetStartTime ( )
inline

Definition at line 58 of file masternode-sync.h.

References nTimeAssetSyncStarted.

Referenced by mnsync().

◆ GetAttempt()

int CMasternodeSync::GetAttempt ( )
inline

Definition at line 56 of file masternode-sync.h.

References nTriedPeerCount.

Referenced by mnsync().

◆ GetSyncStatus()

std::string CMasternodeSync::GetSyncStatus ( )

◆ IsBlockchainSynced()

◆ IsSynced()

◆ NotifyHeaderTip()

void CMasternodeSync::NotifyHeaderTip ( const CBlockIndex pindexNew,
bool  fInitialDownload,
CConnman connman 
)

◆ ProcessMessage()

void CMasternodeSync::ProcessMessage ( CNode pfrom,
const std::string &  strCommand,
CDataStream vRecv 
)

Definition at line 89 of file masternode-sync.cpp.

References CNode::GetId(), IsSynced(), LogPrintf, and NetMsgType::SYNCSTATUSCOUNT.

Referenced by ProcessMessage().

◆ ProcessTick()

◆ Reset()

◆ SendGovernanceSyncRequest()

void CMasternodeSync::SendGovernanceSyncRequest ( CNode pnode,
CConnman connman 
)

◆ SwitchToNextAsset()

◆ UpdatedBlockTip()

void CMasternodeSync::UpdatedBlockTip ( const CBlockIndex pindexNew,
bool  fInitialDownload,
CConnman connman 
)

Member Data Documentation

◆ fReachedBestHeader

bool CMasternodeSync::fReachedBestHeader {false}
private

Set to true if best header is reached in CMasternodeSync::UpdatedBlockTip.

Definition at line 42 of file masternode-sync.h.

Referenced by ProcessTick(), Reset(), and UpdatedBlockTip().

◆ nCurrentAsset

int CMasternodeSync::nCurrentAsset
private

◆ nTimeAssetSyncStarted

int64_t CMasternodeSync::nTimeAssetSyncStarted
private

Definition at line 37 of file masternode-sync.h.

Referenced by GetAssetStartTime(), Reset(), and SwitchToNextAsset().

◆ nTimeLastBumped

int64_t CMasternodeSync::nTimeLastBumped
private

Definition at line 39 of file masternode-sync.h.

Referenced by BumpAssetLastTime(), ProcessTick(), and Reset().

◆ nTimeLastUpdateBlockTip

int64_t CMasternodeSync::nTimeLastUpdateBlockTip {0}
private

Last time UpdateBlockTip has been called.

Definition at line 44 of file masternode-sync.h.

Referenced by Reset(), and UpdatedBlockTip().

◆ nTriedPeerCount

int CMasternodeSync::nTriedPeerCount
private

Definition at line 34 of file masternode-sync.h.

Referenced by GetAttempt(), ProcessTick(), Reset(), and SwitchToNextAsset().


The documentation for this class was generated from the following files:
Released under the MIT license