Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Nov 28, 2024
1 parent 94ef461 commit 8430080
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions nano/node/bounded_backlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ void nano::bounded_backlog::activate (nano::secure::transaction & transaction, n
{
debug_assert (conf_info.frontier != account_info.head);

auto contains = [this] (nano::block_hash const & hash) {
nano::lock_guard<nano::mutex> guard{ mutex };
return index.contains (hash);
};

// Insert blocks into the index starting from the account head block
auto block = ledger.any.block_get (transaction, account_info.head);
while (block)
Expand Down Expand Up @@ -420,6 +415,12 @@ void nano::bounded_backlog::run_scan ()
}
}

bool nano::bounded_backlog::contains (nano::block_hash const & hash) const
{
nano::lock_guard<nano::mutex> guard{ mutex };
return index.contains (hash);
}

nano::container_info nano::bounded_backlog::container_info () const
{
nano::lock_guard<nano::mutex> guard{ mutex };
Expand Down
1 change: 1 addition & 0 deletions nano/node/bounded_backlog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class bounded_backlog

size_t index_size () const;
size_t bucket_threshold () const;
bool contains (nano::block_hash const &) const;

nano::container_info container_info () const;

Expand Down

0 comments on commit 8430080

Please sign in to comment.