Remove election scheduler confirmation_action as it's unused. (#4125)
This commit is contained in:
parent
295f4671b3
commit
14e4d7ebf0
2 changed files with 6 additions and 6 deletions
|
|
@ -32,10 +32,10 @@ void nano::election_scheduler::stop ()
|
|||
nano::join_or_pass (thread);
|
||||
}
|
||||
|
||||
void nano::election_scheduler::manual (std::shared_ptr<nano::block> const & block_a, boost::optional<nano::uint128_t> const & previous_balance_a, nano::election_behavior election_behavior_a, std::function<void (std::shared_ptr<nano::block> const &)> const & confirmation_action_a)
|
||||
void nano::election_scheduler::manual (std::shared_ptr<nano::block> const & block_a, boost::optional<nano::uint128_t> const & previous_balance_a, nano::election_behavior election_behavior_a)
|
||||
{
|
||||
nano::lock_guard<nano::mutex> lock{ mutex };
|
||||
manual_queue.push_back (std::make_tuple (block_a, previous_balance_a, election_behavior_a, confirmation_action_a));
|
||||
manual_queue.push_back (std::make_tuple (block_a, previous_balance_a, election_behavior_a));
|
||||
notify ();
|
||||
}
|
||||
|
||||
|
|
@ -140,11 +140,11 @@ void nano::election_scheduler::run ()
|
|||
}
|
||||
else if (manual_queue_predicate ())
|
||||
{
|
||||
auto const [block, previous_balance, election_behavior, confirmation_action] = manual_queue.front ();
|
||||
auto const [block, previous_balance, election_behavior] = manual_queue.front ();
|
||||
manual_queue.pop_front ();
|
||||
lock.unlock ();
|
||||
nano::unique_lock<nano::mutex> lock2 (node.active.mutex);
|
||||
node.active.insert_impl (lock2, block, election_behavior, confirmation_action);
|
||||
node.active.insert_impl (lock2, block, election_behavior);
|
||||
}
|
||||
else if (priority_queue_predicate ())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public:
|
|||
|
||||
// Manualy start an election for a block
|
||||
// Call action with confirmed block, may be different than what we started with
|
||||
void manual (std::shared_ptr<nano::block> const &, boost::optional<nano::uint128_t> const & = boost::none, nano::election_behavior = nano::election_behavior::normal, std::function<void (std::shared_ptr<nano::block> const &)> const & = nullptr);
|
||||
void manual (std::shared_ptr<nano::block> const &, boost::optional<nano::uint128_t> const & = boost::none, nano::election_behavior = nano::election_behavior::normal);
|
||||
/**
|
||||
* Activates the first unconfirmed block of \p account_a
|
||||
* @return true if account was activated
|
||||
|
|
@ -52,8 +52,8 @@ private:
|
|||
bool overfill_predicate () const;
|
||||
|
||||
nano::prioritization priority;
|
||||
std::deque<std::tuple<std::shared_ptr<nano::block>, boost::optional<nano::uint128_t>, nano::election_behavior, std::function<void (std::shared_ptr<nano::block>)>>> manual_queue;
|
||||
|
||||
std::deque<std::tuple<std::shared_ptr<nano::block>, boost::optional<nano::uint128_t>, nano::election_behavior>> manual_queue;
|
||||
bool stopped{ false };
|
||||
nano::condition_variable condition;
|
||||
mutable nano::mutex mutex;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue