diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index b1ae975bd80..39f5e304aee 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -338,15 +338,15 @@ public: mutable bool fInMempool; mutable CAmount nChangeCached; - CWalletTx(const CWallet* pwalletIn, CTransactionRef arg) - : tx(std::move(arg)) + CWalletTx(const CWallet* wallet, CTransactionRef arg) + : pwallet(wallet), + tx(std::move(arg)) { - Init(pwalletIn); + Init(); } - void Init(const CWallet* pwalletIn) + void Init() { - pwallet = pwalletIn; mapValue.clear(); vOrderForm.clear(); fTimeReceivedIsTxTime = false; @@ -414,7 +414,7 @@ public: template void Unserialize(Stream& s) { - Init(nullptr); + Init(); std::vector dummy_vector1; //!< Used to be vMerkleBranch std::vector dummy_vector2; //!< Used to be vtxPrev