Skip to content

Commit

Permalink
Make cargo fmt happy
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
  • Loading branch information
alexggh committed Sep 12, 2024
1 parent 72150d4 commit e58ec71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
31 changes: 7 additions & 24 deletions polkadot/node/core/approval-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2024,14 +2024,9 @@ async fn handle_from_overseer<
},
FromOrchestra::Communication { msg } => match msg {
ApprovalVotingMessage::ImportAssignment(checked_assignment, tx) => {
let (check_outcome, actions) = import_assignment(
sender,
state,
db,
session_info_provider,
checked_assignment,
)
.await?;
let (check_outcome, actions) =
import_assignment(sender, state, db, session_info_provider, checked_assignment)
.await?;
// approval-distribution makes sure this assignment is valid and expected,
// so this import should never fail, if it does it might mean one of two things,
// there is a bug in the code or the two subsystems got out of sync.
Expand All @@ -2042,16 +2037,9 @@ async fn handle_from_overseer<
actions
},
ApprovalVotingMessage::ImportApproval(a, tx) => {
let result = import_approval(
sender,
state,
db,
session_info_provider,
metrics,
a,
&wakeups,
)
.await?;
let result =
import_approval(sender, state, db, session_info_provider, metrics, a, &wakeups)
.await?;
// approval-distribution makes sure this vote is valid and expected,
// so this import should never fail, if it does it might mean one of two things,
// there is a bug in the code or the two subsystems got out of sync.
Expand Down Expand Up @@ -2560,12 +2548,7 @@ fn schedule_wakeup_action(
last_assignment_tick.map(|l| l + APPROVAL_DELAY).filter(|t| t > &tick_now),
next_no_show,
)
.map(|tick| Action::ScheduleWakeup {
block_hash,
block_number,
candidate_hash,
tick,
})
.map(|tick| Action::ScheduleWakeup { block_hash, block_number, candidate_hash, tick })
},
RequiredTranches::Pending { considered, next_no_show, clock_drift, .. } => {
// select the minimum of `next_no_show`, or the tick of the next non-empty tranche
Expand Down
3 changes: 1 addition & 2 deletions polkadot/node/core/approval-voting/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ where
_relay_vrf_story: polkadot_node_primitives::approval::v1::RelayVRFStory,
_assignment: &polkadot_node_primitives::approval::v2::AssignmentCertV2,
_backing_groups: Vec<polkadot_primitives::GroupIndex>,
) -> Result<polkadot_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment>
{
) -> Result<polkadot_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment> {
self.1(validator_index)
}
}
Expand Down

0 comments on commit e58ec71

Please sign in to comment.