diff options
| author | Ross Nicoll <[email protected]> | 2021-06-03 12:15:24 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2021-06-09 08:14:36 +0100 |
| commit | 39a231053a94afaaca140d3ec8ad795f37accfc1 (patch) | |
| tree | 49b70fcca7eed9ff05e6b65db091129a1c7e332f /src/wallet/context.h | |
| parent | Merge pull request #2252 from rnicoll/1.21-auxpow-parameters (diff) | |
| download | discoin-39a231053a94afaaca140d3ec8ad795f37accfc1.tar.xz discoin-39a231053a94afaaca140d3ec8ad795f37accfc1.zip | |
Add node context to wallet RPC request object
Add node context to wallet RPC request object, as getauxblock needs access to the node to determine if it is in initial block download, and requires access to the wallet to get an address to pay to.
Diffstat (limited to 'src/wallet/context.h')
| -rw-r--r-- | src/wallet/context.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/context.h b/src/wallet/context.h index a83591154..24f862294 100644 --- a/src/wallet/context.h +++ b/src/wallet/context.h @@ -10,6 +10,8 @@ namespace interfaces { class Chain; } // namespace interfaces +struct NodeContext; + //! WalletContext struct containing references to state shared between CWallet //! instances, like the reference to the chain interface, and the list of opened //! wallets. @@ -24,6 +26,9 @@ struct WalletContext { interfaces::Chain* chain{nullptr}; ArgsManager* args{nullptr}; + //! Dogecoin: getauxwork is a wallet RPC but actually needs the NodeContext. + NodeContext* nodeContext{nullptr}; + //! 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. |