Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
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
fmt
  • Loading branch information
arkpar committed Nov 8, 2021
commit 47a889648c510fe032adee6c5646e3c8b4dab9fe
4 changes: 2 additions & 2 deletions client/consensus/babe/src/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub(super) fn check_header<B: BlockT + Sized>(
);

check_secondary_plain_header::<B>(pre_hash, secondary, sig, &epoch)?;
},
}
PreDigest::SecondaryVRF(secondary)
if epoch.config.allowed_slots.is_secondary_vrf_slots_allowed() =>
{
Expand All @@ -122,7 +122,7 @@ pub(super) fn check_header<B: BlockT + Sized>(
);

check_secondary_vrf_header::<B>(pre_hash, secondary, sig, &epoch)?;
},
}
_ => return Err(babe_err(Error::SecondarySlotAssignmentsDisabled)),
}

Expand Down
4 changes: 2 additions & 2 deletions client/network/src/protocol/notifications/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ impl Notifications {
timer: delay_id,
timer_deadline: *backoff,
};
},
}

// Disabled => Enabled
PeerState::Disabled { mut connections, backoff_until } => {
Expand Down Expand Up @@ -2085,7 +2085,7 @@ impl NetworkBehaviour for Notifications {
.boxed(),
);
}
},
}

// We intentionally never remove elements from `delays`, and it may
// thus contain obsolete entries. This is a normal situation.
Expand Down
2 changes: 1 addition & 1 deletion client/network/src/protocol/sync/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl<B: BlockT> BlockCollection<B> {
{
*downloading -= 1;
false
},
}
Some(&mut BlockRangeState::Downloading { .. }) => true,
_ => false,
};
Expand Down
2 changes: 1 addition & 1 deletion client/network/src/service/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ fn fallback_name_working() {
{
assert_eq!(negotiated_fallback, Some(PROTOCOL_NAME));
break
},
}
_ => {},
};
}
Expand Down
4 changes: 2 additions & 2 deletions client/network/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,13 @@ impl<B: BlockT + 'static, H: ExHashT> TransactionsHandler<B, H> {
},
);
debug_assert!(_was_in.is_none());
},
}
Event::NotificationStreamClosed { remote, protocol }
if protocol == self.protocol_name =>
{
let _peer = self.peers.remove(&remote);
debug_assert!(_peer.is_some());
},
}

Event::NotificationsReceived { remote, messages } => {
for (protocol, message) in messages {
Expand Down
2 changes: 1 addition & 1 deletion frame/election-provider-multi-phase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ pub mod pallet {
Self::on_initialize_open_unsigned(enabled, now);
T::WeightInfo::on_initialize_open_unsigned()
}
},
}
_ => T::WeightInfo::on_initialize_nothing(),
}
}
Expand Down
4 changes: 2 additions & 2 deletions frame/support/procedural/src/pallet/parse/pallet_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ impl PalletStructDef {
if generate_storage_info.is_none() =>
{
generate_storage_info = Some(span);
},
}
PalletStructAttr::StorageVersion { storage_version, .. }
if storage_version_found.is_none() =>
{
storage_version_found = Some(storage_version);
},
}
attr => {
let msg = "Unexpected duplicated attribute";
return Err(syn::Error::new(attr.span(), msg))
Expand Down