Fabcoin Core  0.16.2
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, CScheduler &scheduler)
 
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...
 
void ConsiderEviction (CNode *pto, int64_t time_in_seconds)
 
void CheckForStaleTipAndEvictPeers (const Consensus::Params &consensusParams)
 
void EvictExtraOutboundPeers (int64_t time_in_seconds)
 

Private Attributes

CConnman *const connman
 
int64_t m_stale_tip_check_time
 

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 SyncTransaction (const CTransaction &tx, const CBlockIndex *pindex, int posInBlock)
 
virtual void UpdatedTransaction (const uint256 &hash)
 
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...
 
virtual void GetScriptForMining (std::shared_ptr< CReserveScript > &coinbaseScript)
 
virtual void ResetRequestCount (const uint256 &)
 
friend void::RegisterValidationInterface (CValidationInterface *)
 
friend void::UnregisterValidationInterface (CValidationInterface *)
 
friend void::UnregisterAllValidationInterfaces ()
 

Detailed Description

Definition at line 38 of file net_processing.h.

Constructor & Destructor Documentation

PeerLogicValidation::PeerLogicValidation ( CConnman connman,
CScheduler scheduler 
)
explicit

Definition at line 775 of file net_processing.cpp.

Here is the call graph for this function:

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 899 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 788 of file net_processing.cpp.

Here is the call graph for this function:

void PeerLogicValidation::CheckForStaleTipAndEvictPeers ( const Consensus::Params consensusParams)

Definition at line 3087 of file net_processing.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PeerLogicValidation::ConsiderEviction ( CNode pto,
int64_t  time_in_seconds 
)

Definition at line 2980 of file net_processing.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PeerLogicValidation::EvictExtraOutboundPeers ( int64_t  time_in_seconds)

Definition at line 3032 of file net_processing.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements NetEventsInterface.

Definition at line 574 of file net_processing.cpp.

Here is the call graph for this function:

void PeerLogicValidation::InitializeNode ( CNode pnode)
overridevirtual

Implements NetEventsInterface.

Definition at line 562 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 827 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 2860 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 3126 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 868 of file net_processing.cpp.

Here is the call graph for this function:

Member Data Documentation

CConnman* const PeerLogicValidation::connman
private

Definition at line 40 of file net_processing.h.

int64_t PeerLogicValidation::m_stale_tip_check_time
private

Definition at line 69 of file net_processing.h.


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