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