Bitcoin Core  0.15.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)
 
void BlockConnected (const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexConnected, const std::vector< CTransactionRef > &vtxConflicted) override
 Notifies listeners of a block being connected. More...
 
void UpdatedBlockTip (const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
 Notifies listeners of updated block chain tip. More...
 
void BlockChecked (const CBlock &block, const CValidationState &state) override
 Notifies listeners of a block validation result. More...
 
void NewPoWValidBlock (const CBlockIndex *pindex, const std::shared_ptr< const CBlock > &pblock) override
 Notifies listeners that a block which builds directly on our current tip has been received and connected to the headers tree, though not validated yet. More...
 
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
 Send queued protocol messages to be sent to a give node. More...
 

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 BlockDisconnected (const std::shared_ptr< const CBlock > &block)
 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 Inventory (const uint256 &hash)
 Notifies listeners about an inventory item being seen on the network. More...
 
virtual void ResendWalletTransactions (int64_t nBestBlockTime, CConnman *connman)
 Tells listeners to broadcast their data. More...
 
friend void::RegisterValidationInterface (CValidationInterface *)
 
friend void::UnregisterValidationInterface (CValidationInterface *)
 
friend void::UnregisterAllValidationInterfaces ()
 

Detailed Description

Definition at line 25 of file net_processing.h.

Constructor & Destructor Documentation

PeerLogicValidation::PeerLogicValidation ( CConnman connman)
explicit

Definition at line 709 of file net_processing.cpp.

Member Function Documentation

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

Notifies listeners of a block validation result.

If the provided CValidationState IsValid, the provided block is guaranteed to be the current best block at the time the callback was generated (not necessarily now)

Reimplemented from CValidationInterface.

Definition at line 823 of file net_processing.cpp.

Here is the call graph for this function:

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

Notifies listeners of a block being connected.

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

Reimplemented from CValidationInterface.

Definition at line 714 of file net_processing.cpp.

Here is the call graph for this function:

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

Implements NetEventsInterface.

Definition at line 511 of file net_processing.cpp.

Here is the call graph for this function:

void PeerLogicValidation::InitializeNode ( CNode pnode)
overridevirtual

Implements NetEventsInterface.

Definition at line 499 of file net_processing.cpp.

Here is the call graph for this function:

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

Notifies listeners that a block which builds directly on our current tip has been received and connected to the headers tree, though not validated yet.

Reimplemented from CValidationInterface.

Definition at line 751 of file net_processing.cpp.

Here is the call graph for this function:

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

Process protocol messages received from a given node.

Implements NetEventsInterface.

Definition at line 2643 of file net_processing.cpp.

Here is the call graph for this function:

bool PeerLogicValidation::SendMessages ( CNode pto,
std::atomic< bool > &  interrupt 
)
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

Implements NetEventsInterface.

Definition at line 2780 of file net_processing.cpp.

Here is the call graph for this function:

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

Notifies listeners of updated block chain tip.

Reimplemented from CValidationInterface.

Definition at line 792 of file net_processing.cpp.

Here is the call graph for this function:

Member Data Documentation

CConnman* PeerLogicValidation::connman
private

Definition at line 27 of file net_processing.h.


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