mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
[ci] Update ci image with rust 1.77 and 2024-04-10 (#4077)
cc https://github.com/paritytech/ci_cd/issues/974 --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
committed by
GitHub
parent
b6fab8046e
commit
76719da221
@@ -377,22 +377,45 @@ pub mod pallet {
|
||||
const LOG_TARGET: &str = "runtime::inclusion";
|
||||
|
||||
/// The reason that a candidate's outputs were rejected for.
|
||||
#[derive(derive_more::From)]
|
||||
#[cfg_attr(feature = "std", derive(Debug))]
|
||||
enum AcceptanceCheckErr<BlockNumber> {
|
||||
enum AcceptanceCheckErr {
|
||||
HeadDataTooLarge,
|
||||
/// Code upgrades are not permitted at the current time.
|
||||
PrematureCodeUpgrade,
|
||||
/// The new runtime blob is too large.
|
||||
NewCodeTooLarge,
|
||||
/// The candidate violated this DMP acceptance criteria.
|
||||
ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr),
|
||||
ProcessedDownwardMessages,
|
||||
/// The candidate violated this UMP acceptance criteria.
|
||||
UpwardMessages(UmpAcceptanceCheckErr),
|
||||
UpwardMessages,
|
||||
/// The candidate violated this HRMP watermark acceptance criteria.
|
||||
HrmpWatermark(hrmp::HrmpWatermarkAcceptanceErr<BlockNumber>),
|
||||
HrmpWatermark,
|
||||
/// The candidate violated this outbound HRMP acceptance criteria.
|
||||
OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr),
|
||||
OutboundHrmp,
|
||||
}
|
||||
|
||||
impl From<dmp::ProcessedDownwardMessagesAcceptanceErr> for AcceptanceCheckErr {
|
||||
fn from(_: dmp::ProcessedDownwardMessagesAcceptanceErr) -> Self {
|
||||
Self::ProcessedDownwardMessages
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UmpAcceptanceCheckErr> for AcceptanceCheckErr {
|
||||
fn from(_: UmpAcceptanceCheckErr) -> Self {
|
||||
Self::UpwardMessages
|
||||
}
|
||||
}
|
||||
|
||||
impl<BlockNumber> From<hrmp::HrmpWatermarkAcceptanceErr<BlockNumber>> for AcceptanceCheckErr {
|
||||
fn from(_: hrmp::HrmpWatermarkAcceptanceErr<BlockNumber>) -> Self {
|
||||
Self::HrmpWatermark
|
||||
}
|
||||
}
|
||||
|
||||
impl From<hrmp::OutboundHrmpAcceptanceErr> for AcceptanceCheckErr {
|
||||
fn from(_: hrmp::OutboundHrmpAcceptanceErr) -> Self {
|
||||
Self::OutboundHrmp
|
||||
}
|
||||
}
|
||||
|
||||
/// An error returned by [`Pallet::check_upward_messages`] that indicates a violation of one of
|
||||
@@ -1145,7 +1168,7 @@ const fn availability_threshold(n_validators: usize) -> usize {
|
||||
supermajority_threshold(n_validators)
|
||||
}
|
||||
|
||||
impl<BlockNumber> AcceptanceCheckErr<BlockNumber> {
|
||||
impl AcceptanceCheckErr {
|
||||
/// Returns the same error so that it can be threaded through a needle of `DispatchError` and
|
||||
/// ultimately returned from a `Dispatchable`.
|
||||
fn strip_into_dispatch_err<T: Config>(self) -> Error<T> {
|
||||
@@ -1154,10 +1177,10 @@ impl<BlockNumber> AcceptanceCheckErr<BlockNumber> {
|
||||
HeadDataTooLarge => Error::<T>::HeadDataTooLarge,
|
||||
PrematureCodeUpgrade => Error::<T>::PrematureCodeUpgrade,
|
||||
NewCodeTooLarge => Error::<T>::NewCodeTooLarge,
|
||||
ProcessedDownwardMessages(_) => Error::<T>::IncorrectDownwardMessageHandling,
|
||||
UpwardMessages(_) => Error::<T>::InvalidUpwardMessages,
|
||||
HrmpWatermark(_) => Error::<T>::HrmpWatermarkMishandling,
|
||||
OutboundHrmp(_) => Error::<T>::InvalidOutboundHrmp,
|
||||
ProcessedDownwardMessages => Error::<T>::IncorrectDownwardMessageHandling,
|
||||
UpwardMessages => Error::<T>::InvalidUpwardMessages,
|
||||
HrmpWatermark => Error::<T>::HrmpWatermarkMishandling,
|
||||
OutboundHrmp => Error::<T>::InvalidOutboundHrmp,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1300,7 +1323,7 @@ impl<T: Config> CandidateCheckContext<T> {
|
||||
upward_messages: &[primitives::UpwardMessage],
|
||||
hrmp_watermark: BlockNumberFor<T>,
|
||||
horizontal_messages: &[primitives::OutboundHrmpMessage<ParaId>],
|
||||
) -> Result<(), AcceptanceCheckErr<BlockNumberFor<T>>> {
|
||||
) -> Result<(), AcceptanceCheckErr> {
|
||||
ensure!(
|
||||
head_data.0.len() <= self.config.max_head_data_size as _,
|
||||
AcceptanceCheckErr::HeadDataTooLarge,
|
||||
|
||||
Reference in New Issue
Block a user