Initialize m_last_block_processed
to nullptr
.
m_last_block_processed
was introduced in 5ee31726360cbe343f5a1a50a5e440db736da5b7.
Initialize m_last_block_processed
to nullptr
.
m_last_block_processed
was introduced in 5ee31726360cbe343f5a1a50a5e440db736da5b7.
SetNull
)
(Imo, you might as well remove the SetNull)
I checked and SetNull
is never used outside the constructor. Agree to get rid of it, and initialize CWallet’s fields in the proper way. If code needs a clean-slate wallet it can simply create a new object.
781@@ -782,9 +782,12 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
782 unsigned int nMasterKeyMaxID;
783
784 /** Construct wallet with specified name and database implementation. */
785- CWallet(std::string name, std::unique_ptr<CWalletDBWrapper> dbw) : m_name(std::move(name)), dbw(std::move(dbw))
786+ CWallet(std::string name, std::unique_ptr<CWalletDBWrapper> dbw) : fAbortRescan(false), fScanningWallet(false),
787+ pwalletdbEncryption(nullptr), nWalletVersion(FEATURE_BASE), nWalletMaxVersion(FEATURE_BASE), nNextResend(0),
788+ nLastResend(0), fBroadcastTransactions(false), m_max_keypool_index(0), nTimeFirstKey(0),
789+ m_name(std::move(name)), dbw(std::move(dbw)), m_last_block_processed(nullptr), nMasterKeyMaxID(0),
790+ nOrderPosNext(0), nAccountingEntryNumber(0), nRelockTime(0)
utACK f63bc5e06310ea25051e2bf89c231f6096dda169
Re developer notes: Might want to remove that statement, since it seems to conflict the latter one?