Skip to content

Commit

Permalink
Merge branch 'GH-259-avoid-voting' into GH-135-update-fsi
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jun 10, 2024
2 parents 10e7728 + 64d4de3 commit 6917208
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libraries/chain/include/eosio/chain/finality/finalizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ namespace eosio::chain {
// Would require making sure that only the latest is ever written to the file and that the file access was protected separately.
std::unique_lock g(mtx);

if (!enable_voting && bsp->timestamp() < fc::time_point::now() - fc::seconds(30))
return;
enable_voting = true;
if (!enable_voting) { // Avoid extra processing while syncing. Once caught up, consider voting
if (bsp->timestamp() < fc::time_point::now() - fc::seconds(30))
return;
enable_voting = true;
}

// first accumulate all the votes
for (const auto& f : fin_pol.finalizers) {
Expand Down

0 comments on commit 6917208

Please sign in to comment.