Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
wallet::WalletContext Struct Reference

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

#include <context.h>

Collaboration diagram for wallet::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 ()
 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. More...
 
 ~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()

wallet::WalletContext::WalletContext ( )
default

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()

wallet::WalletContext::~WalletContext ( )
default

Member Function Documentation

◆ GUARDED_BY() [1/2]

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

◆ GUARDED_BY() [2/2]

std::list< LoadWalletFn > wallet_load_fns wallet::WalletContext::GUARDED_BY ( wallets_mutex  )

Member Data Documentation

◆ args

ArgsManager* wallet::WalletContext::args {nullptr}

Definition at line 39 of file context.h.

◆ chain

interfaces::Chain* wallet::WalletContext::chain {nullptr}

Definition at line 37 of file context.h.

◆ scheduler

CScheduler* wallet::WalletContext::scheduler {nullptr}

Definition at line 38 of file context.h.

◆ wallets_mutex

Mutex wallet::WalletContext::wallets_mutex

Definition at line 42 of file context.h.


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