Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

timedata.h File Reference
#include <algorithm>
#include <assert.h>
#include <stdint.h>
#include <vector>
+ Include dependency graph for timedata.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CMedianFilter< T >
 Median filter over a stream of values. More...
 

Functions

int64_t GetTimeOffset ()
 Functions to keep track of adjusted P2P time. More...
 
int64_t GetAdjustedTime ()
 
void AddTimeData (const CNetAddr &ip, int64_t nTime)
 

Variables

static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 70 * 60
 

Function Documentation

◆ AddTimeData()

◆ GetAdjustedTime()

int64_t GetAdjustedTime ( )

Definition at line 35 of file timedata.cpp.

References GetTime(), and GetTimeOffset().

Referenced by CChainState::AcceptBlockHeader(), CWallet::AccountMove(), CAddrMan::Add_(), CGovernanceManager::AddCachedTriggers(), CGovernanceManager::AddGovernanceObject(), llmq::CLLMQUtils::AddQuorumProbeConnections(), CWallet::AddToWallet(), llmq::CRecoveredSigsDb::AddVoteTimeKeys(), AppInitMain(), llmq::CChainLocksHandler::BlockConnected(), CheckFinalTx(), CPrivateSendServer::CheckForCompleteQueue(), CGovernanceManager::CheckOrphanVotes(), CGovernanceManager::CheckPostponedObjects(), CGovernanceTriggerManager::CleanAndRemove(), CGovernanceManager::CleanOrphanObjects(), llmq::CSigSharesManager::Cleanup(), llmq::CRecoveredSigsDb::CleanupOldRecoveredSigs(), llmq::CRecoveredSigsDb::CleanupOldVotes(), llmq::CSigSharesManager::CollectSigSharesToRequest(), CPrivateSendServer::CommitFinalTransaction(), CConnman::ConnectNode(), BlockAssembler::CreateNewBlock(), CPrivateSendServer::CreateNewSession(), GetLocalAddress(), gobject_check(), CSporkManager::IsSporkActive(), CPrivateSendQueue::IsTimeOutOfBounds(), llmq::CChainLocksHandler::IsTxSafeForMining(), CGovernanceVote::IsValid(), CGovernanceManager::MasternodeRateCheck(), CMNAuth::ProcessMessage(), ProcessMessage(), llmq::CSigSharesManager::ProcessSigShare(), CSporkManager::ProcessSpork(), CGovernanceObject::ProcessVote(), CGovernanceManager::ProcessVote(), llmq::CDKGDebugManager::ResetLocalSessionStatus(), PeerLogicValidation::SendMessages(), TestBlockValidity(), CConnman::ThreadOpenConnections(), CConnman::ThreadOpenMasternodeConnections(), CMasternodeMetaInfo::ToJson(), llmq::CChainLocksHandler::TrySignChainTip(), CGovernanceManager::UpdateCachesAndClean(), CMasternodeSync::UpdatedBlockTip(), llmq::CDKGDebugManager::UpdateLocalMemberStatus(), llmq::CDKGDebugManager::UpdateLocalSessionStatus(), CGovernanceObject::UpdateSentinelVariables(), CSporkManager::UpdateSpork(), UpdateTime(), CProposalValidator::ValidateStartEndEpoch(), llmq::CDKGSession::VerifyConnectionAndMinProtoVersions(), llmq::CRecoveredSigsDb::WriteRecoveredSig(), and llmq::CRecoveredSigsDb::WriteVoteForId().

◆ GetTimeOffset()

int64_t GetTimeOffset ( )

Functions to keep track of adjusted P2P time.

Functions to keep track of adjusted P2P time.

  • System clock
  • Median of other nodes clocks
  • The user (asking the user to fix the system clock if the first two disagree)

Definition at line 29 of file timedata.cpp.

References cs_nTimeOffset, LOCK, and nTimeOffset.

Referenced by GetAdjustedTime(), and getnetworkinfo().

Variable Documentation

◆ DEFAULT_MAX_TIME_ADJUSTMENT

const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 70 * 60
static

Definition at line 13 of file timedata.h.

Referenced by AddTimeData(), and HelpMessage().

Released under the MIT license