Aggregates the node's subsystems and shared state during its lifetime.
Synopsis
Declared in <node/context.h>
struct NodeContext;
Member Functions
Name |
Description |
|
Declare default constructor and destructor that are not inline, so code instantiating the NodeContext struct doesn't need to #include class definitions for all the unique_ptr members. |
|
Destroy the node context and release its owned members. |
Data Members
Name |
Description |
Address manager tracking known peer addresses. |
|
Parsed command‐line and configuration arguments (memory not owned by this struct). |
|
Background thread that performs the remainder of node initialization. |
|
Tracks and persists banned and discouraged peers. |
|
Interface giving access to the node's chain state. |
|
List of all chain clients (wallet processes or other client) connected to node. |
|
Owns and coordinates the active and background chainstates. |
|
Manages the node's peer‐to‐peer network connections. |
|
Owns the process‐wide libsecp256k1 signing and verification context. |
|
Process exit status, set to a failure value when a fatal error occurs. |
|
Tracks fee‐rate estimates derived from observed transactions. |
|
Active optional block‐chain indexes (memory not owned by this struct). |
|
Init interface for initializing current process and connecting to other processes. |
|
libbitcoin_kernel context |
|
The node's memory pool of unconfirmed transactions. |
|
Reference to chain client that should used to load or create wallets opened by the gui. |
|
Mining options used to create block templates. This value member is an exception to the dependency guidance above because BlockCreateOptions is a minimal dependency. It could be moved to the BlockTemplateCache proposed in bitcoin/bitcoin#33421. |
|
Maps peer addresses to network groups for connection bucketing. |
|
Issues blocking calls about sync status, errors and warnings |
|
Drives peer‐to‐peer message processing and per‐peer state. |
|
Hook invoked at interruption points during long‐running RPCs. |
|
Runs deferred and recurring background tasks. |
|
Function to request a shutdown. |
|
Interrupt object used to track whether node shutdown was requested. |
|
Manages the node's Tor hidden service and control connection. |
|
Issues calls about blocks and transactions |
|
Interface used to load or create wallets, owned elsewhere. |
|
Manages all the node warnings |
Non-Member Functions
Name |
Description |
Submit a transaction to the mempool and (optionally) relay it to all P2P peers. |
|
Look up unspent output information. Returns coins in the mempool and in the current chain UTXO set. Iterates through all the keys in the map and populates the values. |
|
Initialize node and wallet interface pointers. Has no prerequisites or side effects besides allocating memory. |
|
Bitcoin core main initialization. |
|
Helper to create UTXO snapshots given a chainstate and a file handle. |
|
Get the address manager from a node context, asserting it is present. |
|
Extract the node context from an opaque RPC context, asserting it is present. |
|
Get the argument manager from a node context, asserting it is present. |
|
Get the ban manager from a node context, asserting it is present. |
|
Get the chainstate manager from a node context, asserting it is present. |
|
Get the connection manager from a node context, asserting it is present. |
|
Get the fee estimator from a node context, asserting it is present. |
|
Get the mempool from a node context, asserting it is present. |
|
Get the mining interface from a node context, asserting it is present. |
|
Get the peer manager from a node context, asserting it is present. |
|
Initialize node context shutdown and args variables. |
|
Interrupt threads |
|
Shut down the node, stopping threads and releasing resources. |
|
Return whether node shutdown was requested. |
|
Validates requirements to run the indexes and spawns each index initial sync thread |
Created with MrDocs