mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 06:21:02 +00:00
Use same fmt and clippy configs as in Substrate (#7611)
* Use same rustfmt.toml as Substrate Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * format format file Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Format with new config Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add Substrate Clippy config Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Print Clippy version in CI Otherwise its difficult to reproduce locally. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make fmt happy Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update node/core/pvf/src/error.rs Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io> * Update node/core/pvf/src/error.rs Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
This commit is contained in:
committed by
GitHub
parent
ac435c96cf
commit
342d720573
@@ -117,12 +117,12 @@ pub struct HrmpOpenChannelRequest {
|
||||
#[derive(Encode, Decode, TypeInfo)]
|
||||
#[cfg_attr(test, derive(Debug))]
|
||||
pub struct HrmpChannel {
|
||||
// NOTE: This structure is used by parachains via merkle proofs. Therefore, this struct requires
|
||||
// special treatment.
|
||||
// NOTE: This structure is used by parachains via merkle proofs. Therefore, this struct
|
||||
// requires special treatment.
|
||||
//
|
||||
// A parachain requested this struct can only depend on the subset of this struct. Specifically,
|
||||
// only a first few fields can be depended upon (See `AbridgedHrmpChannel`). These fields cannot
|
||||
// be changed without corresponding migration of parachains.
|
||||
// A parachain requested this struct can only depend on the subset of this struct.
|
||||
// Specifically, only a first few fields can be depended upon (See `AbridgedHrmpChannel`).
|
||||
// These fields cannot be changed without corresponding migration of parachains.
|
||||
/// The maximum number of messages that can be pending in the channel at once.
|
||||
pub max_capacity: u32,
|
||||
/// The maximum total size of the messages that can be pending in the channel at once.
|
||||
@@ -370,7 +370,8 @@ pub mod pallet {
|
||||
|
||||
/// The HRMP watermark associated with each para.
|
||||
/// Invariant:
|
||||
/// - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session.
|
||||
/// - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a
|
||||
/// session.
|
||||
#[pallet::storage]
|
||||
pub type HrmpWatermarks<T: Config> = StorageMap<_, Twox64Concat, ParaId, BlockNumberFor<T>>;
|
||||
|
||||
@@ -968,9 +969,9 @@ impl<T: Config> Pallet<T> {
|
||||
out_hrmp_msgs.iter().enumerate().map(|(idx, out_msg)| (idx as u32, out_msg))
|
||||
{
|
||||
match last_recipient {
|
||||
// the messages must be sorted in ascending order and there must be no two messages sent
|
||||
// to the same recipient. Thus we can check that every recipient is strictly greater than
|
||||
// the previous one.
|
||||
// the messages must be sorted in ascending order and there must be no two messages
|
||||
// sent to the same recipient. Thus we can check that every recipient is strictly
|
||||
// greater than the previous one.
|
||||
Some(last_recipient) if out_msg.recipient <= last_recipient =>
|
||||
return Err(OutboundHrmpAcceptanceErr::NotSorted { idx }),
|
||||
_ => last_recipient = Some(out_msg.recipient),
|
||||
|
||||
Reference in New Issue
Block a user