Bitcoin Core
28.99.0
P2P Digital Currency
src
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 <
common/args.h
>
6
#include <
logging.h
>
7
#include <
walletinitinterface.h
>
8
9
class
ArgsManager
;
10
11
namespace
interfaces
{
12
class
Chain;
13
class
Handler;
14
class
Wallet;
15
class
WalletLoader;
16
}
17
18
class
DummyWalletInit
:
public
WalletInitInterface
{
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
(
node::NodeContext
&
node
)
const override
{
LogPrintf
(
"No wallet support compiled in!\n"
);}
25
};
26
27
void
DummyWalletInit::AddWalletOptions
(
ArgsManager
& argsman)
const
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
"-walletcrosschain"
,
55
"-unsafesqlitesync"
,
56
"-swapbdbendian"
,
57
});
58
}
59
60
const
WalletInitInterface
&
g_wallet_init_interface
=
DummyWalletInit
();
61
62
namespace
interfaces
{
63
64
std::unique_ptr<WalletLoader>
MakeWalletLoader
(
Chain
& chain,
ArgsManager
&
args
)
65
{
66
throw
std::logic_error(
"Wallet function called in non-wallet build."
);
67
}
68
69
}
// namespace interfaces
args.h
args
ArgsManager & args
Definition:
bitcoind.cpp:277
ArgsManager
Definition:
args.h:99
ArgsManager::AddHiddenArgs
void AddHiddenArgs(const std::vector< std::string > &args)
Add many hidden arguments.
Definition:
args.cpp:585
DummyWalletInit
Definition:
dummywallet.cpp:18
DummyWalletInit::ParameterInteraction
bool ParameterInteraction() const override
Check wallet parameter interaction.
Definition:
dummywallet.cpp:23
DummyWalletInit::HasWalletSupport
bool HasWalletSupport() const override
Is the wallet component enabled.
Definition:
dummywallet.cpp:21
DummyWalletInit::AddWalletOptions
void AddWalletOptions(ArgsManager &argsman) const override
Get wallet help string.
Definition:
dummywallet.cpp:27
DummyWalletInit::Construct
void Construct(node::NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
Definition:
dummywallet.cpp:24
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:129
g_wallet_init_interface
const WalletInitInterface & g_wallet_init_interface
Definition:
dummywallet.cpp:60
LogPrintf
#define LogPrintf(...)
Definition:
logging.h:266
interfaces
Definition:
interfaces.cpp:41
interfaces::MakeWalletLoader
std::unique_ptr< WalletLoader > MakeWalletLoader(Chain &chain, ArgsManager &args)
Return implementation of ChainClient interface for a wallet loader.
Definition:
dummywallet.cpp:64
node
Definition:
messages.h:20
node::NodeContext
NodeContext struct containing references to chain state and connection state.
Definition:
context.h:56
logging.h
walletinitinterface.h
Generated on Wed Dec 18 2024 20:00:10 for Bitcoin Core by
1.9.4