broken fractured commits, only a few errors remaining

This commit is contained in:
Tadeo hepperle
2024-01-23 13:55:12 +01:00
parent 2c40b14230
commit 70e5118d42
47 changed files with 225 additions and 136 deletions
+7 -2
View File
@@ -33,6 +33,7 @@ pub enum ExtrinsicParamsError {
UnknownSignedExtension(String),
/// Some custom error.
#[display(fmt = "Error constructing extrinsic parameters: {_0}")]
#[cfg(feature = "std")]
Custom(CustomExtrinsicParamsError),
}
@@ -40,13 +41,17 @@ pub enum ExtrinsicParamsError {
impl std::error::Error for ExtrinsicParamsError {}
/// A custom error.
#[cfg(feature = "std")]
pub type CustomExtrinsicParamsError = Box<dyn std::error::Error + Send + Sync + 'static>;
impl From<std::convert::Infallible> for ExtrinsicParamsError {
fn from(value: std::convert::Infallible) -> Self {
impl From<core::convert::Infallible> for ExtrinsicParamsError {
fn from(value: core::convert::Infallible) -> Self {
match value {}
}
}
#[cfg(feature = "std")]
impl From<CustomExtrinsicParamsError> for ExtrinsicParamsError {
fn from(value: CustomExtrinsicParamsError) -> Self {
ExtrinsicParamsError::Custom(value)
+2 -2
View File
@@ -76,7 +76,7 @@ pub trait BlockHash:
+ Encode
+ PartialEq
+ Eq
+ std::hash::Hash
+ core::hash::Hash
{
}
impl<T> BlockHash for T where
@@ -91,7 +91,7 @@ impl<T> BlockHash for T where
+ Encode
+ PartialEq
+ Eq
+ std::hash::Hash
+ core::hash::Hash
{
}
+2 -3
View File
@@ -12,13 +12,12 @@ use crate::prelude::*;
use crate::utils::Era;
use crate::{client::OfflineClientT, Config};
use codec::{Compact, Encode};
use collections::BTreeMap;
use core::fmt::Debug;
use derivative::Derivative;
use scale_decode::DecodeAsType;
use scale_info::PortableRegistry;
use std::collections::HashMap;
/// A single [`SignedExtension`] has a unique name, but is otherwise the
/// same as [`ExtrinsicParams`] in describing how to encode the extra and
/// additional data.
@@ -393,7 +392,7 @@ macro_rules! impl_tuples {
// For each signed extension in the tuple, find the matching index in the metadata, if
// there is one, and add it to a map with that index as the key.
let mut exts_by_index = HashMap::new();
let mut exts_by_index = BTreeMap::new();
$({
for (idx, e) in metadata.extrinsic().signed_extensions().iter().enumerate() {
// Skip over any exts that have a match already:
+3 -3
View File
@@ -5,11 +5,11 @@
//! Substrate specific configuration
use super::{Config, DefaultExtrinsicParams, DefaultExtrinsicParamsBuilder, Hasher, Header};
use codec::{Decode, Encode};
use serde::{Deserialize, Serialize};
use crate::prelude::*;
pub use crate::utils::{AccountId32, MultiAddress, MultiSignature};
use codec::{Decode, Encode};
pub use primitive_types::{H256, U256};
use serde::{Deserialize, Serialize};
/// Default set of commonly used types by Substrate runtimes.
// Note: We only use this at the type level, so it should be impossible to