@@ -206,6 +206,18 @@ class ScriptPubKeyMan
206206 virtual bool CanProvide (const CScript& script, SignatureData& sigdata) { return false ; }
207207
208208 virtual uint256 GetID () const { return uint256 (); }
209+
210+ /* * Prepends the wallet name in logging output to ease debugging in multi-wallet use cases */
211+ template <typename ... Params>
212+ void WalletLogPrintf (std::string fmt, Params... parameters) const {
213+ LogPrintf ((" %s " + fmt).c_str (), m_storage.GetDisplayName (), parameters...);
214+ };
215+
216+ /* * Watch-only address added */
217+ boost::signals2::signal<void (bool fHaveWatchOnly )> NotifyWatchonlyChanged;
218+
219+ /* * Keypool has new keys */
220+ boost::signals2::signal<void ()> NotifyCanGetAddressesChanged;
209221};
210222
211223class LegacyScriptPubKeyMan : public ScriptPubKeyMan , public FillableSigningProvider
@@ -290,6 +302,8 @@ class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProv
290302 bool ReserveKeyFromKeyPool (int64_t & nIndex, CKeyPool& keypool, bool fRequestedInternal );
291303
292304public:
305+ using ScriptPubKeyMan::ScriptPubKeyMan;
306+
293307 bool GetNewDestination (const OutputType type, CTxDestination& dest, std::string& error) override ;
294308 isminetype IsMine (const CScript& script) const override ;
295309
@@ -426,14 +440,6 @@ class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProv
426440 const std::map<CKeyID, int64_t >& GetAllReserveKeys () const { return m_pool_key_to_index; }
427441
428442 std::set<CKeyID> GetKeys () const override ;
429- // Temporary CWallet accessors and aliases.
430- friend class CWallet ;
431- friend class ReserveDestination ;
432- LegacyScriptPubKeyMan (CWallet& wallet);
433- void NotifyWatchonlyChanged (bool fHaveWatchOnly ) const ;
434- void NotifyCanGetAddressesChanged () const ;
435- template <typename ... Params> void WalletLogPrintf (const std::string& fmt, const Params&... parameters) const ;
436- CWallet& m_wallet;
437443};
438444
439445#endif // BITCOIN_WALLET_SCRIPTPUBKEYMAN_H
0 commit comments