diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2023-05-01 10:21:36 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-05-15 12:23:15 -0300 |
commit | 043fcb0b053eee6021cc75e3d3f41097f52698c0 (patch) | |
tree | 8e73d511345dc5dc8777e5b8280a7584be230ec6 /src/wallet/bdb.h | |
parent | d7700d3a26478d9b1648463c188648c7047b1c60 (diff) | |
download | bitcoin-043fcb0b053eee6021cc75e3d3f41097f52698c0.tar.xz |
wallet: bugfix, GetNewCursor() misses to provide batch ptr to BerkeleyCursor
If the batch ptr is not passed, the cursor will not use the db active
txn context which could lead to a deadlock if the code tries to modify
the db while it is traversing it.
E.g. the 'EraseRecords()' function.
Diffstat (limited to 'src/wallet/bdb.h')
-rw-r--r-- | src/wallet/bdb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/bdb.h b/src/wallet/bdb.h index 4fac128bf1..9134643b23 100644 --- a/src/wallet/bdb.h +++ b/src/wallet/bdb.h @@ -192,7 +192,7 @@ private: Dbc* m_cursor; public: - explicit BerkeleyCursor(BerkeleyDatabase& database, BerkeleyBatch* batch=nullptr); + explicit BerkeleyCursor(BerkeleyDatabase& database, const BerkeleyBatch& batch); ~BerkeleyCursor() override; Status Next(DataStream& key, DataStream& value) override; |