2021-12-30 14:36:57 -03:00
|
|
|
// Copyright (c) 2018-2021 The Bitcoin Core developers
|
2018-09-07 13:35:42 -03:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2018-10-22 19:51:11 -03:00
|
|
|
#include <util/system.h>
|
2018-09-07 13:35:42 -03:00
|
|
|
#include <walletinitinterface.h>
|
|
|
|
|
2017-12-05 17:57:12 -03:00
|
|
|
class ArgsManager;
|
2018-09-12 11:05:00 -03:00
|
|
|
|
2019-01-12 08:47:04 -03:00
|
|
|
namespace interfaces {
|
|
|
|
class Chain;
|
2019-09-27 08:31:44 -03:00
|
|
|
class Handler;
|
|
|
|
class Wallet;
|
2021-12-22 15:44:55 -03:00
|
|
|
class WalletLoader;
|
2019-01-12 08:47:04 -03:00
|
|
|
}
|
|
|
|
|
2018-09-07 13:35:42 -03:00
|
|
|
class DummyWalletInit : public WalletInitInterface {
|
|
|
|
public:
|
|
|
|
|
2018-09-07 13:36:53 -03:00
|
|
|
bool HasWalletSupport() const override {return false;}
|
2020-07-19 03:31:51 -04:00
|
|
|
void AddWalletOptions(ArgsManager& argsman) const override;
|
2018-09-07 13:35:42 -03:00
|
|
|
bool ParameterInteraction() const override {return true;}
|
2021-11-12 12:06:00 -03:00
|
|
|
void Construct(node::NodeContext& node) const override {LogPrintf("No wallet support compiled in!\n");}
|
2018-09-07 13:35:42 -03:00
|
|
|
};
|
|
|
|
|
2020-07-19 03:31:51 -04:00
|
|
|
void DummyWalletInit::AddWalletOptions(ArgsManager& argsman) const
|
2018-09-07 13:35:42 -03:00
|
|
|
{
|
2020-07-19 03:47:05 -04:00
|
|
|
argsman.AddHiddenArgs({
|
2019-04-28 00:42:14 -04:00
|
|
|
"-addresstype",
|
2019-04-28 00:42:38 -04:00
|
|
|
"-avoidpartialspends",
|
2019-04-28 00:42:14 -04:00
|
|
|
"-changetype",
|
2021-05-20 16:54:23 -04:00
|
|
|
"-consolidatefeerate=<amt>",
|
2019-04-28 00:42:14 -04:00
|
|
|
"-disablewallet",
|
|
|
|
"-discardfee=<amt>",
|
|
|
|
"-fallbackfee=<amt>",
|
|
|
|
"-keypool=<n>",
|
2018-10-25 21:36:56 -03:00
|
|
|
"-maxapsfee=<n>",
|
2019-04-28 00:42:14 -04:00
|
|
|
"-maxtxfee=<amt>",
|
|
|
|
"-mintxfee=<amt>",
|
|
|
|
"-paytxfee=<amt>",
|
2019-04-27 13:10:35 -04:00
|
|
|
"-signer=<cmd>",
|
2019-04-28 00:42:14 -04:00
|
|
|
"-spendzeroconfchange",
|
|
|
|
"-txconfirmtarget=<n>",
|
|
|
|
"-wallet=<path>",
|
|
|
|
"-walletbroadcast",
|
|
|
|
"-walletdir=<dir>",
|
|
|
|
"-walletnotify=<cmd>",
|
|
|
|
"-walletrbf",
|
|
|
|
"-dblogsize=<n>",
|
|
|
|
"-flushwallet",
|
|
|
|
"-privdb",
|
|
|
|
"-walletrejectlongchains",
|
2020-04-06 16:24:16 -04:00
|
|
|
"-walletcrosschain",
|
2021-04-07 20:55:09 -04:00
|
|
|
"-unsafesqlitesync",
|
2019-04-28 00:42:14 -04:00
|
|
|
});
|
2018-09-07 13:35:42 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
const WalletInitInterface& g_wallet_init_interface = DummyWalletInit();
|
2018-09-12 11:05:00 -03:00
|
|
|
|
2019-09-27 08:31:44 -03:00
|
|
|
namespace interfaces {
|
2018-09-12 11:05:00 -03:00
|
|
|
|
2021-12-22 15:44:55 -03:00
|
|
|
std::unique_ptr<WalletLoader> MakeWalletLoader(Chain& chain, ArgsManager& args)
|
2017-12-05 17:57:12 -03:00
|
|
|
{
|
|
|
|
throw std::logic_error("Wallet function called in non-wallet build.");
|
|
|
|
}
|
|
|
|
|
2018-09-12 11:05:00 -03:00
|
|
|
} // namespace interfaces
|