aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallettool.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-03-22 00:24:55 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-04-10 09:51:37 -0400
commitfbc6bb8e8310ddf12e675d698cda3bdae4f361b8 (patch)
tree9d07dd4bd95627d4d997aebedfd2135ba2ccbbc4 /src/wallet/wallettool.cpp
parent6a135fbe5b30c3603616589b4779b1ce602c9392 (diff)
bitcoin-wallet tool: Drop MakeChain calls
Pass null Chain interface pointer to CWallet. This is needed to drop libbitcoin_server dependency and avoid linking node code.
Diffstat (limited to 'src/wallet/wallettool.cpp')
-rw-r--r--src/wallet/wallettool.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp
index 797f051189..1ff1e8b840 100644
--- a/src/wallet/wallettool.cpp
+++ b/src/wallet/wallettool.cpp
@@ -4,7 +4,6 @@
#include <base58.h>
#include <fs.h>
-#include <interfaces/chain.h>
#include <util/system.h>
#include <wallet/wallet.h>
#include <wallet/walletutil.h>
@@ -28,8 +27,7 @@ static std::shared_ptr<CWallet> CreateWallet(const std::string& name, const fs::
return nullptr;
}
// dummy chain interface
- auto chain = interfaces::MakeChain();
- std::shared_ptr<CWallet> wallet_instance(new CWallet(*chain, WalletLocation(name), WalletDatabase::Create(path)), WalletToolReleaseWallet);
+ std::shared_ptr<CWallet> wallet_instance(new CWallet(nullptr /* chain */, WalletLocation(name), WalletDatabase::Create(path)), WalletToolReleaseWallet);
bool first_run = true;
DBErrors load_wallet_ret = wallet_instance->LoadWallet(first_run);
if (load_wallet_ret != DBErrors::LOAD_OK) {
@@ -56,8 +54,7 @@ static std::shared_ptr<CWallet> LoadWallet(const std::string& name, const fs::pa
}
// dummy chain interface
- auto chain = interfaces::MakeChain();
- std::shared_ptr<CWallet> wallet_instance(new CWallet(*chain, WalletLocation(name), WalletDatabase::Create(path)), WalletToolReleaseWallet);
+ std::shared_ptr<CWallet> wallet_instance(new CWallet(nullptr /* chain */, WalletLocation(name), WalletDatabase::Create(path)), WalletToolReleaseWallet);
DBErrors load_wallet_ret;
try {
bool first_run;