diff --git a/silkworm/node/db/mdbx.cpp b/silkworm/node/db/mdbx.cpp index 9513666d46..9302fce300 100644 --- a/silkworm/node/db/mdbx.cpp +++ b/silkworm/node/db/mdbx.cpp @@ -264,7 +264,7 @@ PooledCursor::PooledCursor() { } } -PooledCursor::PooledCursor(RWTxn& txn, ::mdbx::map_handle map) { +PooledCursor::PooledCursor(ROTxn& txn, ::mdbx::map_handle map) { handle_ = handles_pool_.acquire(); if (!handle_) { handle_ = ::mdbx_cursor_create(nullptr); diff --git a/silkworm/node/db/mdbx.hpp b/silkworm/node/db/mdbx.hpp index 6c49fbb4e0..41504ef4c9 100644 --- a/silkworm/node/db/mdbx.hpp +++ b/silkworm/node/db/mdbx.hpp @@ -386,8 +386,9 @@ size_t max_value_size_for_leaf_page(const ::mdbx::txn& txn, size_t key_size); class PooledCursor : public RWCursorDupSort, protected ::mdbx::cursor { public: explicit PooledCursor(); - explicit PooledCursor(RWTxn& txn, ::mdbx::map_handle map); + explicit PooledCursor(ROTxn& txn, ::mdbx::map_handle map); explicit PooledCursor(::mdbx::txn& txn, const MapConfig& config); + explicit PooledCursor(ROTxn& txn, const MapConfig& config) : PooledCursor(*txn, config) {} ~PooledCursor() override; PooledCursor(PooledCursor&& other) noexcept;