Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
further correct condition
  • Loading branch information
rphmeier committed Sep 15, 2021
commit e3105ac04aa8c559a0ec6d097aaeb34aac20e04e
7 changes: 4 additions & 3 deletions node/core/approval-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1874,13 +1874,14 @@ fn advance_approval_state(
status.required_tranches,
));

// We have no need to write the candidate entry if
// We have no need to write the candidate entry if all of the following
// are trueL
//
// 1. The approver is remote, as we don't store anything new in the approval entry.
// 1. This is not a local approval, as we don't store anything new in the approval entry.
// 2. The candidate is not newly approved, as we haven't altered the approval entry's
// approved flag with `mark_approved` above.
// 3. The approver, if any, had already approved the candidate, as we haven't altered the bitfield.
if !transition.is_remote_approval() ||
if transition.is_local_approval() ||
newly_approved ||
!already_approved_by.unwrap_or(true)
{
Expand Down