Bitcoin Core  24.1.0
P2P Digital Currency
dummywallet.cpp
Go to the documentation of this file.
1 // Copyright (c) 2018-2021 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #include <util/system.h>
6 #include <walletinitinterface.h>
7 
8 class ArgsManager;
9 
10 namespace interfaces {
11 class Chain;
12 class Handler;
13 class Wallet;
14 class WalletLoader;
15 }
16 
18 public:
19 
20  bool HasWalletSupport() const override {return false;}
21  void AddWalletOptions(ArgsManager& argsman) const override;
22  bool ParameterInteraction() const override {return true;}
23  void Construct(node::NodeContext& node) const override {LogPrintf("No wallet support compiled in!\n");}
24 };
25 
27 {
28  argsman.AddHiddenArgs({
29  "-addresstype",
30  "-avoidpartialspends",
31  "-changetype",
32  "-consolidatefeerate=<amt>",
33  "-disablewallet",
34  "-discardfee=<amt>",
35  "-fallbackfee=<amt>",
36  "-keypool=<n>",
37  "-maxapsfee=<n>",
38  "-maxtxfee=<amt>",
39  "-mintxfee=<amt>",
40  "-paytxfee=<amt>",
41  "-signer=<cmd>",
42  "-spendzeroconfchange",
43  "-txconfirmtarget=<n>",
44  "-wallet=<path>",
45  "-walletbroadcast",
46  "-walletdir=<dir>",
47  "-walletnotify=<cmd>",
48  "-walletrbf",
49  "-dblogsize=<n>",
50  "-flushwallet",
51  "-privdb",
52  "-walletrejectlongchains",
53  "-walletcrosschain",
54  "-unsafesqlitesync",
55  });
56 }
57 
59 
60 namespace interfaces {
61 
62 std::unique_ptr<WalletLoader> MakeWalletLoader(Chain& chain, ArgsManager& args)
63 {
64  throw std::logic_error("Wallet function called in non-wallet build.");
65 }
66 
67 } // namespace interfaces
bool ParameterInteraction() const override
Check wallet parameter interaction.
Definition: dummywallet.cpp:22
bool HasWalletSupport() const override
Is the wallet component enabled.
Definition: dummywallet.cpp:20
void AddHiddenArgs(const std::vector< std::string > &args)
Add many hidden arguments.
Definition: system.cpp:732
ArgsManager args
void Construct(node::NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
Definition: dummywallet.cpp:23
NodeContext struct containing references to chain state and connection state.
Definition: context.h:43
std::unique_ptr< WalletLoader > MakeWalletLoader(Chain &chain, ArgsManager &args)
Return implementation of ChainClient interface for a wallet loader.
Definition: dummywallet.cpp:62
Interface for accessing a wallet.
Definition: wallet.h:57
Wallet chain client that in addition to having chain client methods for starting up, shutting down, and registering RPCs, also has additional methods (called by the GUI) to load and create wallets.
Definition: wallet.h:319
Definition: init.h:25
Generic interface for managing an event handler or callback function registered with another interfac...
Definition: handler.h:22
const WalletInitInterface & g_wallet_init_interface
Definition: dummywallet.cpp:58
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition: chain.h:117
#define LogPrintf(...)
Definition: logging.h:234
void AddWalletOptions(ArgsManager &argsman) const override
Get wallet help string.
Definition: dummywallet.cpp:26