Bitcoin Core  22.99.0
P2P Digital Currency
dummywallet.cpp
Go to the documentation of this file.
1 // Copyright (c) 2018-2020 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 class CWallet;
10 
11 namespace interfaces {
12 class Chain;
13 class Handler;
14 class Wallet;
15 class WalletClient;
16 }
17 
19 public:
20 
21  bool HasWalletSupport() const override {return false;}
22  void AddWalletOptions(ArgsManager& argsman) const override;
23  bool ParameterInteraction() const override {return true;}
24  void Construct(NodeContext& node) const override {LogPrintf("No wallet support compiled in!\n");}
25 };
26 
28 {
29  argsman.AddHiddenArgs({
30  "-addresstype",
31  "-avoidpartialspends",
32  "-changetype",
33  "-consolidatefeerate=<amt>",
34  "-disablewallet",
35  "-discardfee=<amt>",
36  "-fallbackfee=<amt>",
37  "-keypool=<n>",
38  "-maxapsfee=<n>",
39  "-maxtxfee=<amt>",
40  "-mintxfee=<amt>",
41  "-paytxfee=<amt>",
42  "-signer=<cmd>",
43  "-spendzeroconfchange",
44  "-txconfirmtarget=<n>",
45  "-wallet=<path>",
46  "-walletbroadcast",
47  "-walletdir=<dir>",
48  "-walletnotify=<cmd>",
49  "-walletrbf",
50  "-dblogsize=<n>",
51  "-flushwallet",
52  "-privdb",
53  "-walletrejectlongchains",
54  "-unsafesqlitesync",
55  });
56 }
57 
59 
60 namespace interfaces {
61 
62 std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet)
63 {
64  throw std::logic_error("Wallet function called in non-wallet build.");
65 }
66 
67 std::unique_ptr<WalletClient> MakeWalletClient(Chain& chain, ArgsManager& args)
68 {
69  throw std::logic_error("Wallet function called in non-wallet build.");
70 }
71 
72 } // namespace interfaces
interfaces
Definition: dummywallet.cpp:11
ArgsManager::AddHiddenArgs
void AddHiddenArgs(const std::vector< std::string > &args)
Add many hidden arguments.
Definition: system.cpp:659
wallet
Definition: interfaces.cpp:50
DummyWalletInit::Construct
void Construct(NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
Definition: dummywallet.cpp:24
interfaces::MakeWalletClient
std::unique_ptr< WalletClient > MakeWalletClient(Chain &chain, ArgsManager &args)
Return implementation of ChainClient interface for a wallet client.
Definition: dummywallet.cpp:67
interfaces::Chain
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition: chain.h:92
WalletInitInterface
Definition: walletinitinterface.h:12
DummyWalletInit::AddWalletOptions
void AddWalletOptions(ArgsManager &argsman) const override
Get wallet help string.
Definition: dummywallet.cpp:27
DummyWalletInit::ParameterInteraction
bool ParameterInteraction() const override
Check wallet parameter interaction.
Definition: dummywallet.cpp:23
LogPrintf
#define LogPrintf(...)
Definition: logging.h:187
interfaces::WalletClient
Wallet chain client that in addition to having chain client methods for starting up,...
Definition: wallet.h:312
walletinitinterface.h
interfaces::Wallet
Interface for accessing a wallet.
Definition: wallet.h:52
interfaces::MakeWallet
std::unique_ptr< Wallet > MakeWallet(const std::shared_ptr< CWallet > &wallet)
Definition: dummywallet.cpp:62
DummyWalletInit
Definition: dummywallet.cpp:18
system.h
DummyWalletInit::HasWalletSupport
bool HasWalletSupport() const override
Is the wallet component enabled.
Definition: dummywallet.cpp:21
ArgsManager
Definition: system.h:158
CWallet
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:228
node
Definition: interfaces.cpp:68
g_wallet_init_interface
const WalletInitInterface & g_wallet_init_interface
Definition: dummywallet.cpp:58
interfaces::Handler
Generic interface for managing an event handler or callback function registered with another interfac...
Definition: handler.h:22
NodeContext
NodeContext struct containing references to chain state and connection state.
Definition: context.h:39