Skip to content

Commit

Permalink
GH-2102 No need to recalculate finality digest
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Apr 5, 2024
1 parent 302b957 commit be77ca6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3530,16 +3530,14 @@ struct controller_impl {
if (!bsp->block->is_proper_svnn_block())
return;

auto finalizer_digest = bsp->compute_finality_digest();

// Each finalizer configured on the node which is present in the active finalizer policy
// may create and sign a vote
// TODO: as a future optimization, we could run maybe_vote on a thread (it would need a
// lock around the file access). We should document that the voted_block is emitted
// off the main thread. net_plugin is fine for this to be emitted from any thread.
// Just need to update the comment in net_plugin
my_finalizers.maybe_vote(
*bsp->active_finalizer_policy, bsp, finalizer_digest, [&](const vote_message& vote) {
*bsp->active_finalizer_policy, bsp, bsp->strong_digest, [&](const vote_message& vote) {
// net plugin subscribed to this signal. it will broadcast the vote message
// on receiving the signal
emit(voted_block, vote);
Expand Down

0 comments on commit be77ca6

Please sign in to comment.