aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/bdb.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2023-05-01 10:21:36 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-05-15 12:23:15 -0300
commit043fcb0b053eee6021cc75e3d3f41097f52698c0 (patch)
tree8e73d511345dc5dc8777e5b8280a7584be230ec6 /src/wallet/bdb.h
parentd7700d3a26478d9b1648463c188648c7047b1c60 (diff)
downloadbitcoin-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.h2
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;