diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -360,13 +360,12 @@ mutable bool fInMempool; mutable Amount nChangeCached; - CWalletTx(const CWallet *pwalletIn, CTransactionRef arg) - : tx(std::move(arg)) { - Init(pwalletIn); + CWalletTx(const CWallet *wallet, CTransactionRef arg) + : pwallet(wallet), tx(std::move(arg)) { + Init(); } - void Init(const CWallet *pwalletIn) { - pwallet = pwalletIn; + void Init() { mapValue.clear(); vOrderForm.clear(); fTimeReceivedIsTxTime = false; @@ -438,7 +437,7 @@ } template void Unserialize(Stream &s) { - Init(nullptr); + Init(); //! Used to be vMerkleBranch std::vector dummy_vector1;