From b2607dbabfbb9c9f55a919d9ade5dedebaf2f8aa Mon Sep 17 00:00:00 2001 From: Colin LeMahieu Date: Tue, 19 Mar 2024 12:48:49 +0000 Subject: [PATCH] Clean active_transactions::activate_successors signature. --- nano/node/active_transactions.cpp | 8 ++++---- nano/node/active_transactions.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nano/node/active_transactions.cpp b/nano/node/active_transactions.cpp index 1b9c4af7..d9d88918 100644 --- a/nano/node/active_transactions.cpp +++ b/nano/node/active_transactions.cpp @@ -179,16 +179,16 @@ void nano::active_transactions::handle_final_votes_confirmation (std::shared_ptr // Next-block activations are only done for blocks with previously active elections if (cemented_bootstrap_count_reached && was_active) { - activate_successors (account, block, transaction); + activate_successors (transaction, block); } } -void nano::active_transactions::activate_successors (const nano::account & account, std::shared_ptr const & block, nano::store::read_transaction const & transaction) +void nano::active_transactions::activate_successors (nano::store::read_transaction const & transaction, std::shared_ptr const & block) { - node.scheduler.priority.activate (account, transaction); + node.scheduler.priority.activate (block->account (), transaction); // Start or vote for the next unconfirmed block in the destination account - if (block->is_send () && !block->destination ().is_zero () && block->destination () != account) + if (block->is_send () && !block->destination ().is_zero () && block->destination () != block->account ()) { node.scheduler.priority.activate (block->destination (), transaction); } diff --git a/nano/node/active_transactions.hpp b/nano/node/active_transactions.hpp index 3ce2772f..9f56d5ca 100644 --- a/nano/node/active_transactions.hpp +++ b/nano/node/active_transactions.hpp @@ -200,7 +200,7 @@ private: void process_active_confirmation (nano::store::read_transaction const & transaction, std::shared_ptr const & block, nano::election_status_type status); void handle_final_votes_confirmation (std::shared_ptr const & block, nano::store::read_transaction const & transaction, nano::election_status_type status); void handle_confirmation (nano::store::read_transaction const & transaction, std::shared_ptr const & block, std::shared_ptr election, nano::election_status_type status); - void activate_successors (const nano::account & account, std::shared_ptr const & block, nano::store::read_transaction const & transaction); + void activate_successors (nano::store::read_transaction const & transaction, std::shared_ptr const & block); void notify_observers (nano::store::read_transaction const & transaction, nano::election_status const & status, std::vector const & votes); private: // Dependencies