Skip to content

Commit

Permalink
Rocksdb: Don't read block content when checking if block exists (#4333)
Browse files Browse the repository at this point in the history
  • Loading branch information
RickiNano authored Nov 6, 2023
1 parent 94d44c1 commit 358bf03
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nano/store/rocksdb/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 358bf03

Please sign in to comment.