Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
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 <common/args.h>
6#include <logging.h>
8
9class CChainParams;
10class CWallet;
11
12namespace interfaces {
13class Chain;
14class Handler;
15class Wallet;
16} // namespace interfaces
17
19public:
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 {
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"};
37 argsman.AddHiddenArgs(opts);
38}
39
41
42namespace interfaces {
43
44std::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
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
Definition chainparams.h:80
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition wallet.h:254
bool ParameterInteraction() const override
Check wallet parameter interaction.
bool HasWalletSupport() const override
Is the wallet component enabled.
void AddWalletOptions(ArgsManager &argsman) const override
Get wallet help string.
void Construct(node::NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition chain.h:123
Generic interface for managing an event handler or callback function registered with another interfac...
Definition handler.h:22
Interface for accessing a wallet.
Definition wallet.h:59
const WalletInitInterface & g_wallet_init_interface
#define LogPrintf(...)
Definition logging.h:227
std::unique_ptr< Wallet > MakeWallet(const std::shared_ptr< CWallet > &wallet)
Return implementation of Wallet interface.
Definition init.h:28
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
NodeContext struct containing references to chain state and connection state.
Definition context.h:43