Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed Sep 3, 2023
1 parent 8d0415e commit 3055266
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion nano/core_test/scheduler_buckets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ std::shared_ptr<nano::state_block> & block3 ()
return result;
}

namespace {
namespace
{
auto test_insert = [] (std::shared_ptr<nano::block> const & block, nano::election_behavior behavior) { return nano::election_insertion_result{}; };
}

Expand Down
6 changes: 4 additions & 2 deletions nano/core_test/scheduler_limiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

#include <gtest/gtest.h>

namespace {
namespace
{
auto test_insert = [] (std::shared_ptr<nano::block> const & block, nano::election_behavior behavior) { return nano::election_insertion_result{}; };
}

Expand All @@ -28,7 +29,8 @@ TEST (scheduler_limiter, election_activate_observer)
nano::test::system system{ 1 };
auto occupancy = std::make_shared<nano::scheduler::limiter> ([&] (auto const & block, auto const & behavior) {
return system.node (0).active.insert (block, behavior);
}, 1, nano::election_behavior::normal);
},
1, nano::election_behavior::normal);
auto result = occupancy->activate (nano::dev::genesis);
ASSERT_TRUE (result.inserted);
auto elections = occupancy->elections ();
Expand Down
1 change: 0 additions & 1 deletion nano/node/scheduler/buckets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <string>


nano::scheduler::buckets::bucket::bucket (std::shared_ptr<nano::scheduler::limiter> const & limiter) :
limiter{ limiter }
{
Expand Down
2 changes: 1 addition & 1 deletion nano/node/scheduler/optimistic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ nano::scheduler::optimistic::optimistic (optimistic_config const & config_a, nan
config{ config_a },
node{ node_a },
ledger{ ledger_a },
limiter{ std::make_shared <nano::scheduler::limiter> (node.active.insert_fn (), node.config.active_elections_optimistic_limit_percentage * node.config.active_elections_size / 100, nano::election_behavior::optimistic) },
limiter{ std::make_shared<nano::scheduler::limiter> (node.active.insert_fn (), node.config.active_elections_optimistic_limit_percentage * node.config.active_elections_size / 100, nano::election_behavior::optimistic) },
network_constants{ network_constants_a },
stats{ stats_a }
{
Expand Down

0 comments on commit 3055266

Please sign in to comment.