From 358bf03f35e4a99b05d88a6948f3d713b5bff491 Mon Sep 17 00:00:00 2001 From: RickiNano <81099017+RickiNano@users.noreply.github.com> Date: Mon, 6 Nov 2023 20:48:42 +0100 Subject: [PATCH] Rocksdb: Don't read block content when checking if block exists (#4333) --- nano/store/rocksdb/block.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nano/store/rocksdb/block.cpp b/nano/store/rocksdb/block.cpp index fbf1ecf1f0..2fe5365e86 100644 --- a/nano/store/rocksdb/block.cpp +++ b/nano/store/rocksdb/block.cpp @@ -121,9 +121,7 @@ void nano::store::rocksdb::block::del (store::write_transaction const & transact bool nano::store::rocksdb::block::exists (store::transaction const & transaction, nano::block_hash const & hash) { - nano::store::rocksdb::db_val junk; - block_raw_get (transaction, hash, junk); - return junk.size () != 0; + return store.exists (transaction, tables::blocks, hash); } uint64_t nano::store::rocksdb::block::count (store::transaction const & transaction_a)