Bitcoin ABC
0.30.7
P2P Digital Currency
src
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
>
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
18
class
DummyWalletInit
:
public
WalletInitInterface
{
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
(
node::NodeContext
&
node
)
const override
{
24
LogPrintf
(
"No wallet support compiled in!\n"
);
25
}
26
};
27
28
void
DummyWalletInit::AddWalletOptions
(
ArgsManager
&argsman)
const
{
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
40
const
WalletInitInterface
&
g_wallet_init_interface
=
DummyWalletInit
();
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
args.h
ArgsManager
Definition:
args.h:96
ArgsManager::AddHiddenArgs
void AddHiddenArgs(const std::vector< std::string > &args)
Add many hidden arguments.
Definition:
args.cpp:642
CChainParams
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
Definition:
chainparams.h:80
CWallet
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition:
wallet.h:254
DummyWalletInit
Definition:
dummywallet.cpp:18
DummyWalletInit::ParameterInteraction
bool ParameterInteraction() const override
Check wallet parameter interaction.
Definition:
dummywallet.cpp:22
DummyWalletInit::HasWalletSupport
bool HasWalletSupport() const override
Is the wallet component enabled.
Definition:
dummywallet.cpp:20
DummyWalletInit::AddWalletOptions
void AddWalletOptions(ArgsManager &argsman) const override
Get wallet help string.
Definition:
dummywallet.cpp:28
DummyWalletInit::Construct
void Construct(node::NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
Definition:
dummywallet.cpp:23
WalletInitInterface
Definition:
walletinitinterface.h:14
interfaces::Chain
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition:
chain.h:123
interfaces::Handler
Generic interface for managing an event handler or callback function registered with another interfac...
Definition:
handler.h:22
interfaces::Wallet
Interface for accessing a wallet.
Definition:
wallet.h:59
g_wallet_init_interface
const WalletInitInterface & g_wallet_init_interface
Definition:
dummywallet.cpp:40
logging.h
LogPrintf
#define LogPrintf(...)
Definition:
logging.h:227
interfaces
Definition:
dummywallet.cpp:12
interfaces::MakeWallet
std::unique_ptr< Wallet > MakeWallet(const std::shared_ptr< CWallet > &wallet)
Return implementation of Wallet interface.
Definition:
dummywallet.cpp:44
node
Definition:
init.h:28
wallet
Definition:
interfaces.cpp:45
node::NodeContext
NodeContext struct containing references to chain state and connection state.
Definition:
context.h:43
walletinitinterface.h
Generated on Sat Dec 21 2024 14:46:05 for Bitcoin ABC by
1.9.4