PIVX Core  5.6.99
P2P Digital Currency
evonotificationinterface.cpp
Go to the documentation of this file.
1 // Copyright (c) 2014-2019 The Dash Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
6 
7 #include "evo/deterministicmns.h"
8 #include "evo/mnauth.h"
9 #include "llmq/quorums.h"
12 #include "validation.h"
13 
15 {
16  LOCK(cs_main);
17  deterministicMNManager->SetTipIndex(chainActive.Tip());
18 }
19 
21 {
22  llmq::chainLocksHandler->AcceptedBlockHeader(pindexNew);
23 }
24 
25 void EvoNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload)
26 {
27  // background thread updates
28  llmq::chainLocksHandler->UpdatedBlockTip(pindexNew);
29  llmq::quorumDKGSessionManager->UpdatedBlockTip(pindexNew, fInitialDownload);
30  llmq::quorumManager->UpdatedBlockTip(pindexNew, fInitialDownload);
31 }
32 
34 {
35  CMNAuth::NotifyMasternodeListChanged(undo, oldMNList, diff);
36 }
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:139
CBlockIndex * Tip(bool fProofOfStake=false) const
Returns the index entry for the tip of this chain, or nullptr if none.
Definition: chain.h:405
static void NotifyMasternodeListChanged(bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff)
Definition: mnauth.cpp:198
void NotifyMasternodeListChanged(bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff) override
Notifies listeners of updated deterministic masternode list.
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
Notifies listeners when the block chain tip advances.
void AcceptedBlockHeader(const CBlockIndex *pindexNew) override
std::unique_ptr< CDeterministicMNManager > deterministicMNManager
@ LOCK
Definition: lockunlock.h:16
std::unique_ptr< CQuorumManager > quorumManager
Definition: quorums.cpp:31
std::unique_ptr< CDKGSessionManager > quorumDKGSessionManager
std::unique_ptr< CChainLocksHandler > chainLocksHandler
RecursiveMutex cs_main
Global state.
Definition: validation.cpp:80
CChain chainActive
The currently-connected chain of blocks (protected by cs_main).
Definition: validation.cpp:84