Bitcoin ABC  0.24.11
P2P Digital Currency
dummywallet.cpp
Go to the documentation of this file.
1 // Copyright (c) 2018 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 <logging.h>
6 #include <util/system.h>
7 #include <walletinitinterface.h>
8 
9 class CChainParams;
10 class CWallet;
11 
12 namespace interfaces {
13 class Chain;
14 class Handler;
15 class Wallet;
16 } // namespace interfaces
17 
19 public:
20  bool HasWalletSupport() const override { return false; }
21  void AddWalletOptions(ArgsManager &argsman) const override;
22  bool ParameterInteraction() const override { return true; }
23  void Construct(NodeContext &node) const override {
24  LogPrintf("No wallet support compiled in!\n");
25  }
26 };
27 
29  std::vector<std::string> opts = {
30  "-avoidpartialspends", "-disablewallet", "-fallbackfee=<amt>",
31  "-keypool=<n>", "-maxapsfee=<n>", "-maxtxfee=<amt>", "-mintxfee=<amt>",
32  "-paytxfee=<amt>", "-rescan", "-salvagewallet", "-spendzeroconfchange",
33  "-upgradewallet", "-wallet=<path>", "-walletbroadcast",
34  "-walletdir=<dir>", "-walletnotify=<cmd>",
35  // Wallet debug options
36  "-dblogsize=<n>", "-flushwallet", "-privdb", "-walletrejectlongchains"};
37  argsman.AddHiddenArgs(opts);
38 }
39 
41 
42 namespace interfaces {
43 
44 std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet> &wallet) {
45  throw std::logic_error("Wallet function called in non-wallet build.");
46 }
47 
48 } // namespace interfaces
interfaces
Definition: dummywallet.cpp:12
ArgsManager::AddHiddenArgs
void AddHiddenArgs(const std::vector< std::string > &args)
Add many hidden arguments.
Definition: system.cpp:671
interfaces::MakeWallet
std::unique_ptr< Wallet > MakeWallet(const std::shared_ptr< CWallet > &wallet)
Return implementation of Wallet interface.
Definition: dummywallet.cpp:44
CChainParams
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
Definition: chainparams.h:47
DummyWalletInit::Construct
void Construct(NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
Definition: dummywallet.cpp:23
interfaces::Chain
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition: chain.h:108
WalletInitInterface
Definition: walletinitinterface.h:12
DummyWalletInit::AddWalletOptions
void AddWalletOptions(ArgsManager &argsman) const override
Get wallet help string.
Definition: dummywallet.cpp:28
DummyWalletInit::ParameterInteraction
bool ParameterInteraction() const override
Check wallet parameter interaction.
Definition: dummywallet.cpp:22
walletinitinterface.h
interfaces::Wallet
Interface for accessing a wallet.
Definition: wallet.h:59
DummyWalletInit
Definition: dummywallet.cpp:18
system.h
DummyWalletInit::HasWalletSupport
bool HasWalletSupport() const override
Is the wallet component enabled.
Definition: dummywallet.cpp:20
ArgsManager
Definition: system.h:148
CWallet
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:678
logging.h
g_wallet_init_interface
const WalletInitInterface & g_wallet_init_interface
Definition: dummywallet.cpp:40
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:36
LogPrintf
static void LogPrintf(const char *fmt, const Args &... args)
Definition: logging.h:175