From 127904319dfc8bb4012abe3fd779457288a8bf10 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Fri, 14 Jul 2023 12:22:53 +0200 Subject: [PATCH] node: fix Windows build after ROTxn/RWTxn refactoring (#1329) --- silkworm/node/db/mdbx.cpp | 2 +- silkworm/node/db/mdbx.hpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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;