Skip to content

Commit

Permalink
Move evaluation of election->confirmed () within debug_assert so it d…
Browse files Browse the repository at this point in the history
…oesn't need to be evaluated when debugging is off.
  • Loading branch information
clemahieu committed Oct 11, 2023
1 parent 1f69bc0 commit 2482106
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions nano/node/active_transactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,7 @@ void nano::active_transactions::cleanup_election (nano::unique_lock<nano::mutex>
{
debug_assert (!mutex.try_lock ());
debug_assert (lock_a.owns_lock ());

if (election->confirmed ())
{
debug_assert (recently_confirmed.exists (election->qualified_root));
}
debug_assert (!election->confirmed () || recently_confirmed.exists (election->qualified_root));

node.stats.inc (completion_type (*election), nano::to_stat_detail (election->behavior ()));
// Keep track of election count by election type
Expand Down

0 comments on commit 2482106

Please sign in to comment.