diff --git a/nano/node/bounded_backlog.cpp b/nano/node/bounded_backlog.cpp index ce2f6dc153..e13ec6a09b 100644 --- a/nano/node/bounded_backlog.cpp +++ b/nano/node/bounded_backlog.cpp @@ -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 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) @@ -420,6 +415,12 @@ void nano::bounded_backlog::run_scan () } } +bool nano::bounded_backlog::contains (nano::block_hash const & hash) const +{ + nano::lock_guard guard{ mutex }; + return index.contains (hash); +} + nano::container_info nano::bounded_backlog::container_info () const { nano::lock_guard guard{ mutex }; diff --git a/nano/node/bounded_backlog.hpp b/nano/node/bounded_backlog.hpp index b75e68377f..6f47f1705c 100644 --- a/nano/node/bounded_backlog.hpp +++ b/nano/node/bounded_backlog.hpp @@ -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;