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

#include <net_processing.h>

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

Public Member Functions

 PeerLogicValidation (CConnman *connman)
 
 ~PeerLogicValidation ()=default
 
void BlockConnected (const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindex) override
 Notifies listeners of a block being connected. More...
 
void UpdatedBlockTip (const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
 Notifies listeners when the block chain tip advances. More...
 
void BlockChecked (const CBlock &block, const CValidationState &state) override
 
void InitializeNode (CNode *pnode) override
 
void FinalizeNode (NodeId nodeid, bool &fUpdateConnectionTime) override
 
bool ProcessMessages (CNode *pfrom, std::atomic< bool > &interrupt) override
 Process protocol messages received from a given node. More...
 
bool SendMessages (CNode *pto, std::atomic< bool > &interrupt) override EXCLUSIVE_LOCKS_REQUIRED(pto -> cs_sendProcessing)
 Send queued protocol messages to be sent to a give node. More...
 
- Public Member Functions inherited from CValidationInterface
virtual ~CValidationInterface ()=default
 
virtual void AcceptedBlockHeader (const CBlockIndex *pindexNew)
 

Private Attributes

CConnmanconnman
 

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 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...
 
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 35 of file net_processing.h.

Constructor & Destructor Documentation

◆ PeerLogicValidation()

PeerLogicValidation::PeerLogicValidation ( CConnman connman)
explicit

Definition at line 704 of file net_processing.cpp.

◆ ~PeerLogicValidation()

PeerLogicValidation::~PeerLogicValidation ( )
default

Member Function Documentation

◆ BlockChecked()

void PeerLogicValidation::BlockChecked ( const CBlock block,
const CValidationState state 
)
overridevirtual

Reimplemented from CValidationInterface.

Definition at line 762 of file net_processing.cpp.

Here is the call graph for this function:

◆ BlockConnected()

void PeerLogicValidation::BlockConnected ( const std::shared_ptr< const CBlock > &  block,
const CBlockIndex pindex 
)
overridevirtual

Notifies listeners of a block being connected.

Provides a vector of transactions evicted from the mempool as a result.

Called on a background thread.

Reimplemented from CValidationInterface.

Definition at line 711 of file net_processing.cpp.

Here is the call graph for this function:

◆ FinalizeNode()

void PeerLogicValidation::FinalizeNode ( NodeId  nodeid,
bool &  fUpdateConnectionTime 
)
overridevirtual

Implements NetEventsInterface.

Definition at line 471 of file net_processing.cpp.

Here is the call graph for this function:

◆ InitializeNode()

void PeerLogicValidation::InitializeNode ( CNode pnode)
overridevirtual

Implements NetEventsInterface.

Definition at line 459 of file net_processing.cpp.

Here is the call graph for this function:

◆ ProcessMessages()

bool PeerLogicValidation::ProcessMessages ( CNode pfrom,
std::atomic< bool > &  interrupt 
)
overridevirtual

Process protocol messages received from a given node.

Implements NetEventsInterface.

Definition at line 2255 of file net_processing.cpp.

◆ SendMessages()

bool PeerLogicValidation::SendMessages ( CNode pto,
std::atomic< bool > &  interrupt 
) -> cs_sendProcessing)
overridevirtual

Send queued protocol messages to be sent to a give node.

Parameters
[in]ptoThe node which we are sending messages to.
[in]interruptInterrupt condition for processing threads
Returns
True if there is more work to be done
Todo:
: back port feerate filter.

Implements NetEventsInterface.

Definition at line 2375 of file net_processing.cpp.

Here is the call graph for this function:

◆ UpdatedBlockTip()

void PeerLogicValidation::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 742 of file net_processing.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ connman

CConnman* PeerLogicValidation::connman
private

Definition at line 37 of file net_processing.h.


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