Skip to content

Commit 04998ef

Browse files
committed
fixup! walletdb: Handle cursor internally
1 parent ca24edf commit 04998ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/wallet/bdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ void BerkeleyEnvironment::CheckpointLSN(const std::string& strFile)
335335
}
336336

337337

338-
BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const char* pszMode, bool fFlushOnCloseIn) : pdb(nullptr), activeTxn(nullptr), m_cursor(nullptr)
338+
BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const char* pszMode, bool fFlushOnCloseIn)
339339
{
340340
fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
341341
fFlushOnClose = fFlushOnCloseIn;

src/wallet/bdb.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ class BerkeleyBatch
208208
};
209209

210210
protected:
211-
Db* pdb;
211+
Db* pdb{nullptr};
212212
std::string strFile;
213-
DbTxn* activeTxn;
214-
Dbc* m_cursor;
213+
DbTxn* activeTxn{nullptr};
214+
Dbc* m_cursor{nullptr};
215215
bool fReadOnly;
216216
bool fFlushOnClose;
217217
BerkeleyEnvironment *env;

0 commit comments

Comments
 (0)