Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Address nits from discussions
Browse files Browse the repository at this point in the history
  • Loading branch information
s0me0ne-unkn0wn committed Jan 3, 2023
1 parent 996538f commit 029b82b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions node/core/dispute-coordinator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ impl DisputeCoordinatorSubsystem {
},
};

let session_info;
let validators = match rolling_session_window.session_info(session) {
let session_info = match rolling_session_window.session_info(session) {
None => {
gum::warn!(
target: LOG_TARGET,
Expand All @@ -312,11 +311,9 @@ impl DisputeCoordinatorSubsystem {
);
continue
},
Some(info) => {
session_info = info;
info.validators.clone()
},
Some(info) => info,
};
let validators = session_info.validators.clone();

let voted_indices = votes.voted_indices();

Expand Down
4 changes: 2 additions & 2 deletions node/core/pvf-checker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ async fn handle_leaves_update(
.on_leaves_update(Some((activated.hash, pending_pvfs)), &update.deactivated);
metrics.on_pvf_observed(outcome.newcomers.len());
metrics.on_pvf_left(outcome.left_num);
if outcome.newcomers.len() > 0 {
if !outcome.newcomers.is_empty() {
let session_index = match (&new_session_index, &state.latest_session) {
(Some((nsi, _)), _) => *nsi,
(None, Some(lsi)) => *lsi,
Expand Down Expand Up @@ -341,7 +341,7 @@ async fn handle_leaves_update(
initiate_precheck(
state,
sender,
recent_block_hash,
activated.hash,
newcomer,
executor_params.clone(),
metrics,
Expand Down

0 comments on commit 029b82b

Please sign in to comment.