Bitcoin Core
0.21.1
P2P Digital Currency
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
src
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
CWallet
;
9
10
namespace
interfaces
{
11
class
Chain
;
12
class
Handler
;
13
class
Wallet
;
14
}
15
16
class
DummyWalletInit
:
public
WalletInitInterface
{
17
public
:
18
19
bool
HasWalletSupport
()
const override
{
return
false
;}
20
void
AddWalletOptions
(
ArgsManager
& argsman)
const override
;
21
bool
ParameterInteraction
()
const override
{
return
true
;}
22
void
Construct
(
NodeContext
& node)
const override
{
LogPrintf
(
"No wallet support compiled in!\n"
);}
23
};
24
25
void
DummyWalletInit::AddWalletOptions
(
ArgsManager
& argsman)
const
26
{
27
argsman.
AddHiddenArgs
({
28
"-addresstype"
,
29
"-avoidpartialspends"
,
30
"-changetype"
,
31
"-disablewallet"
,
32
"-discardfee=<amt>"
,
33
"-fallbackfee=<amt>"
,
34
"-keypool=<n>"
,
35
"-maxapsfee=<n>"
,
36
"-maxtxfee=<amt>"
,
37
"-mintxfee=<amt>"
,
38
"-paytxfee=<amt>"
,
39
"-rescan"
,
40
"-salvagewallet"
,
41
"-spendzeroconfchange"
,
42
"-txconfirmtarget=<n>"
,
43
"-wallet=<path>"
,
44
"-walletbroadcast"
,
45
"-walletdir=<dir>"
,
46
"-walletnotify=<cmd>"
,
47
"-walletrbf"
,
48
"-dblogsize=<n>"
,
49
"-flushwallet"
,
50
"-privdb"
,
51
"-walletrejectlongchains"
,
52
});
53
}
54
55
const
WalletInitInterface
&
g_wallet_init_interface
=
DummyWalletInit
();
56
57
namespace
interfaces
{
58
59
std::unique_ptr<Wallet>
MakeWallet
(
const
std::shared_ptr<CWallet>& wallet)
60
{
61
throw
std::logic_error(
"Wallet function called in non-wallet build."
);
62
}
63
64
}
// namespace interfaces
DummyWalletInit::ParameterInteraction
bool ParameterInteraction() const override
Check wallet parameter interaction.
Definition:
dummywallet.cpp:21
LogPrintf
static void LogPrintf(const char *fmt, const Args &...args)
Definition:
logging.h:166
DummyWalletInit::HasWalletSupport
bool HasWalletSupport() const override
Is the wallet component enabled.
Definition:
dummywallet.cpp:19
ArgsManager::AddHiddenArgs
void AddHiddenArgs(const std::vector< std::string > &args)
Add many hidden arguments.
Definition:
system.cpp:526
ArgsManager
Definition:
system.h:156
DummyWalletInit::Construct
void Construct(NodeContext &node) const override
Add wallets that should be opened to list of chain clients.
Definition:
dummywallet.cpp:22
NodeContext
NodeContext struct containing references to chain state and connection state.
Definition:
context.h:36
interfaces
Definition:
dummywallet.cpp:10
interfaces::Wallet
Interface for accessing a wallet.
Definition:
wallet.h:52
WalletInitInterface
Definition:
walletinitinterface.h:12
interfaces::MakeWallet
std::unique_ptr< Wallet > MakeWallet(const std::shared_ptr< CWallet > &wallet)
Return implementation of Wallet interface.
Definition:
dummywallet.cpp:59
interfaces::Handler
Generic interface for managing an event handler or callback function registered with another interfac...
Definition:
handler.h:22
DummyWalletInit
Definition:
dummywallet.cpp:16
g_wallet_init_interface
const WalletInitInterface & g_wallet_init_interface
Definition:
dummywallet.cpp:55
interfaces::Chain
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition:
chain.h:83
system.h
CWallet
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition:
wallet.h:633
DummyWalletInit::AddWalletOptions
void AddWalletOptions(ArgsManager &argsman) const override
Get wallet help string.
Definition:
dummywallet.cpp:25
walletinitinterface.h
Generated on Fri Apr 30 2021 13:53:39 for Bitcoin Core by
1.8.8