WalletContext struct containing references to state shared between CWallet instances, like the reference to the chain interface, and the list of opened wallets.
Synopsis
Declared in <wallet/context.h>
struct WalletContext;
Description
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.
Member Functions
Name |
Description |
|
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. |
|
Destroys the wallet context. |
Data Members
Name |
Description |
Command‐line and configuration arguments. |
|
Interface to the blockchain, shared by all wallets. |
|
Scheduler used to run periodic wallet tasks. |
|
Callbacks invoked when a wallet is loaded. |
|
The currently opened wallets. |
|
Guards the list of opened wallets and load callbacks. |
Non-Member Functions
Name |
Description |
Register a loaded wallet with the wallet context. |
|
Create a new wallet and load it into the context. |
|
Retrieves the WalletContext stored in an RPC context, throwing if absent. |
|
Return the default wallet and report how many wallets are loaded. |
|
Look up a loaded wallet by name. |
|
Return all wallets currently loaded in the context. |
|
Register a callback invoked whenever a wallet is loaded. |
|
Load an existing wallet from disk into the context. |
|
Load wallet databases. |
|
Called periodically by the schedule thread. Prompts individual wallets to resend their transactions. Actual rebroadcast schedule is managed by the wallets themselves. |
|
Fire the load‐wallet callbacks for a newly loaded wallet. |
|
Remove a wallet from the wallet context and optionally update its load‐on‐startup setting. |
|
Remove a wallet from the wallet context and optionally update its load‐on‐startup setting. |
|
Restore a wallet from a backup file. |
|
Complete startup of wallets. |
|
Stop and unload all wallets held by the context. |
|
Responsible for reading and validating the ‐wallet arguments and verifying the wallet database. |
Created with MrDocs