 |
Bitcoin Core
22.99.0
P2P Digital Currency
|
Go to the documentation of this file.
6 #ifndef BITCOIN_NET_PROCESSING_H
7 #define BITCOIN_NET_PROCESSING_H
77 virtual void Misbehaving(
const NodeId pnode,
const int howmuch,
const std::string& message) = 0;
87 const std::chrono::microseconds time_received,
const std::atomic<bool>& interruptMsgProc) = 0;
90 #endif // BITCOIN_NET_PROCESSING_H
Implement this to subscribe to events generated in validation.
virtual bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) const =0
Get statistics from node state.
virtual void SendPings()=0
Send ping message to all peers.
std::vector< int > vHeightInFlight
Simple class for background tasks that should be run periodically or once "after a while".
virtual bool IgnoresIncomingTxs()=0
Whether this node ignores txs received over p2p.
Interface for message handling.
virtual void Misbehaving(const NodeId pnode, const int howmuch, const std::string &message)=0
Increment peer's misbehavior score.
uint64_t m_addr_rate_limited
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Information about a peer.
Stochastic address manager.
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
static std::unique_ptr< PeerManager > make(const CChainParams &chainparams, CConnman &connman, AddrMan &addrman, BanMan *banman, ChainstateManager &chainman, CTxMemPool &pool, bool ignore_incoming_txs)
bool m_addr_relay_enabled
virtual void SetBestHeight(int height)=0
Set the best height.
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS
Default for -maxorphantx, maximum number of orphan transactions kept in memory.
static const bool DEFAULT_PEERBLOCKFILTERS
virtual void StartScheduledTasks(CScheduler &scheduler)=0
Begin running background tasks, should only be called once.
static const bool DEFAULT_PEERBLOOMFILTERS
virtual void ProcessMessage(CNode &pfrom, const std::string &msg_type, CDataStream &vRecv, const std::chrono::microseconds time_received, const std::atomic< bool > &interruptMsgProc)=0
Process a single message from a peer.
static const unsigned int DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN
Default number of orphan+recently-replaced txn to keep around for block reconstruction.
virtual void CheckForStaleTipAndEvictPeers()=0
Evict extra outbound peers.
uint64_t m_addr_processed
Provides an interface for creating and interacting with one or two chainstates: an IBD chainstate gen...
static const int DISCOURAGEMENT_THRESHOLD
Threshold for marking a node to be discouraged, e.g.
Double ended buffer combining vector and stream-like interfaces.
std::chrono::microseconds m_ping_wait
virtual void RelayTransaction(const uint256 &txid, const uint256 &wtxid)=0
Relay transaction to all peers.
The block chain is a tree shaped structure starting with the genesis block at the root,...
virtual std::optional< std::string > FetchBlock(NodeId peer_id, const CBlockIndex &block_index)=0
Attempt to manually fetch block from a given peer.