Bitcoin ABC 0.30.5
P2P Digital Currency
|
NodeContext struct containing references to chain state and connection state. More...
#include <context.h>
Public Member Functions | |
NodeContext () | |
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. More... | |
~NodeContext () | |
Public Attributes | |
std::unique_ptr< AddrMan > | addrman |
std::unique_ptr< CConnman > | connman |
std::unique_ptr< CTxMemPool > | mempool |
std::unique_ptr< PeerManager > | peerman |
std::unique_ptr< ChainstateManager > | chainman |
std::unique_ptr< BanMan > | banman |
ArgsManager * | args {nullptr} |
std::unique_ptr< interfaces::Chain > | chain |
std::vector< std::unique_ptr< interfaces::ChainClient > > | chain_clients |
List of all chain clients (wallet processes or other client) connected to node. More... | |
interfaces::WalletClient * | wallet_client {nullptr} |
Reference to chain client that should used to load or create wallets opened by the gui. More... | |
std::unique_ptr< CScheduler > | scheduler |
std::function< void()> | rpc_interruption_point = [] {} |
std::unique_ptr< KernelNotifications > | notifications |
std::unique_ptr< avalanche::Processor > | avalanche |
NodeContext struct containing references to chain state and connection state.
This is used by init, rpc, and test code to pass object references around without needing to declare the same variables and parameters repeatedly, or to use globals. More variables could be added to this struct (particularly references to validation objects) to eliminate use of globals and make code more modular and testable. The struct isn't intended to have any member functions. It should just be a collection of references that can be used without pulling in unwanted dependencies or functionality.
node::NodeContext::NodeContext | ( | ) |
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.
Definition at line 19 of file context.cpp.
node::NodeContext::~NodeContext | ( | ) |
Definition at line 20 of file context.cpp.
ArgsManager* node::NodeContext::args {nullptr} |
std::unique_ptr<avalanche::Processor> node::NodeContext::avalanche |
std::unique_ptr<interfaces::Chain> node::NodeContext::chain |
std::vector<std::unique_ptr<interfaces::ChainClient> > node::NodeContext::chain_clients |
std::unique_ptr<ChainstateManager> node::NodeContext::chainman |
std::unique_ptr<CTxMemPool> node::NodeContext::mempool |
std::unique_ptr<KernelNotifications> node::NodeContext::notifications |
std::unique_ptr<PeerManager> node::NodeContext::peerman |
std::function<void()> node::NodeContext::rpc_interruption_point = [] {} |
std::unique_ptr<CScheduler> node::NodeContext::scheduler |
interfaces::WalletClient* node::NodeContext::wallet_client {nullptr} |