From cb8836fe64be20168cb1bbdbb6f2c1a2639fc6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+fikumikudev@users.noreply.github.com> Date: Thu, 21 Jul 2022 16:23:20 +0200 Subject: [PATCH] Make header a bit more readable --- nano/node/election.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nano/node/election.hpp b/nano/node/election.hpp index 47d63681f..fbd1fc71a 100644 --- a/nano/node/election.hpp +++ b/nano/node/election.hpp @@ -101,9 +101,14 @@ public: // Status nano::election_status status; public: // Interface - election (nano::node &, std::shared_ptr const &, std::function const &)> const &, std::function const &, nano::election_behavior); + election (nano::node &, std::shared_ptr const & block, std::function const &)> const & confirmation_action, std::function const & vote_action, nano::election_behavior behavior); + std::shared_ptr find (nano::block_hash const &) const; - nano::election_vote_result vote (nano::account const &, uint64_t, nano::block_hash const &); + /* + * Process vote. Internally uses cooldown to throttle non-final votes + * If the election reaches consensus, it will be confirmed + */ + nano::election_vote_result vote (nano::account const & representative, uint64_t timestamp, nano::block_hash const & block_hash); bool publish (std::shared_ptr const & block_a); std::size_t insert_inactive_votes_cache (nano::inactive_cache_information const &); // Confirm this block if quorum is met