Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
WalletContext Struct Reference

#include <context.h>

Collaboration diagram for WalletContext:
[legend]

Public Member Functions

std::vector< std::shared_ptr< CWallet > > wallets GUARDED_BY (wallets_mutex)
std::list< LoadWalletFn > wallet_load_fns GUARDED_BY (wallets_mutex)
 WalletContext ()
 ~WalletContext ()

Public Attributes

interfaces::Chainchain {nullptr}
CSchedulerscheduler {nullptr}
ArgsManagerargs {nullptr}
Mutex wallets_mutex

Detailed Description

WalletContext struct containing references to state shared between CWallet instances, like the reference to the chain interface, and the list of opened wallets.

Future shared state can be added here as an alternative to adding global variables.

The struct isn't intended to have any member functions. It should just be a collection of state pointers that doesn't pull in dependencies or implement behavior.

Definition at line 36 of file context.h.

Constructor & Destructor Documentation

◆ WalletContext()

Declare default constructor and destructor that are not inline, so code instantiating the WalletContext struct doesn't need to #include class definitions for smart pointer and container members.

◆ ~WalletContext()

Member Function Documentation

◆ GUARDED_BY() [1/2]

◆ GUARDED_BY() [2/2]

std::vector< std::shared_ptr< CWallet > > wallets wallet::WalletContext::GUARDED_BY ( wallets_mutex )

Member Data Documentation

◆ args

Definition at line 39 of file context.h.

◆ chain

Definition at line 37 of file context.h.

◆ scheduler

Definition at line 38 of file context.h.

◆ wallets_mutex


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