diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2019-03-22 00:24:55 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-04-10 09:51:37 -0400 |
commit | fbc6bb8e8310ddf12e675d698cda3bdae4f361b8 (patch) | |
tree | 9d07dd4bd95627d4d997aebedfd2135ba2ccbbc4 /src/wallet/wallet.h | |
parent | 6a135fbe5b30c3603616589b4779b1ce602c9392 (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/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index cefdf479c6..a09c27262e 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -704,7 +704,7 @@ private: bool AddWatchOnly(const CScript& dest) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); /** Interface for accessing chain state. */ - interfaces::Chain& m_chain; + interfaces::Chain* m_chain; /** Wallet location which includes wallet name (see WalletLocation). */ WalletLocation m_location; @@ -767,7 +767,7 @@ public: unsigned int nMasterKeyMaxID = 0; /** Construct wallet with specified name and database implementation. */ - CWallet(interfaces::Chain& chain, const WalletLocation& location, std::unique_ptr<WalletDatabase> database) : m_chain(chain), m_location(location), database(std::move(database)) + CWallet(interfaces::Chain* chain, const WalletLocation& location, std::unique_ptr<WalletDatabase> database) : m_chain(chain), m_location(location), database(std::move(database)) { } @@ -795,7 +795,7 @@ public: std::unique_ptr<interfaces::Handler> m_chain_notifications_handler; /** Interface for accessing chain state. */ - interfaces::Chain& chain() const { return m_chain; } + interfaces::Chain& chain() const { assert(m_chain); return *m_chain; } const CWalletTx* GetWalletTx(const uint256& hash) const; |