mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
refactor: remove ::vpwallets and related global variables
Move global wallet variables to WalletContext struct
This commit is contained in:
@@ -332,6 +332,9 @@ public:
|
||||
//! loaded at startup or by RPC.
|
||||
using LoadWalletFn = std::function<void(std::unique_ptr<Wallet> wallet)>;
|
||||
virtual std::unique_ptr<Handler> handleLoadWallet(LoadWalletFn fn) = 0;
|
||||
|
||||
//! Return pointer to internal context, useful for testing.
|
||||
virtual WalletContext* context() { return nullptr; }
|
||||
};
|
||||
|
||||
//! Information about one wallet address.
|
||||
@@ -410,7 +413,7 @@ struct WalletTxOut
|
||||
|
||||
//! Return implementation of Wallet interface. This function is defined in
|
||||
//! dummywallet.cpp and throws if the wallet component is not compiled.
|
||||
std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet);
|
||||
std::unique_ptr<Wallet> MakeWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet);
|
||||
|
||||
//! Return implementation of ChainClient interface for a wallet client. This
|
||||
//! function will be undefined in builds where ENABLE_WALLET is false.
|
||||
|
||||
Reference in New Issue
Block a user