mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
* Revert "Build block without checking signatures (#4916)"
This reverts commit e50f610907.
* Some further clean ups
This commit is contained in:
@@ -30,7 +30,7 @@ use crate::codec::{Codec, Encode, Decode};
|
||||
use crate::transaction_validity::{
|
||||
ValidTransaction, TransactionValidity, TransactionValidityError, UnknownTransaction,
|
||||
};
|
||||
use crate::generic::{Digest, DigestItem, CheckSignature};
|
||||
use crate::generic::{Digest, DigestItem};
|
||||
pub use sp_arithmetic::traits::{
|
||||
AtLeast32Bit, UniqueSaturatedInto, UniqueSaturatedFrom, Saturating, SaturatedConversion,
|
||||
Zero, One, Bounded, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv,
|
||||
@@ -647,7 +647,7 @@ pub trait Checkable<Context>: Sized {
|
||||
type Checked;
|
||||
|
||||
/// Check self, given an instance of Context.
|
||||
fn check(self, signature: CheckSignature, c: &Context) -> Result<Self::Checked, TransactionValidityError>;
|
||||
fn check(self, c: &Context) -> Result<Self::Checked, TransactionValidityError>;
|
||||
}
|
||||
|
||||
/// A "checkable" piece of information, used by the standard Substrate Executive in order to
|
||||
@@ -659,15 +659,15 @@ pub trait BlindCheckable: Sized {
|
||||
type Checked;
|
||||
|
||||
/// Check self.
|
||||
fn check(self, signature: CheckSignature) -> Result<Self::Checked, TransactionValidityError>;
|
||||
fn check(self) -> Result<Self::Checked, TransactionValidityError>;
|
||||
}
|
||||
|
||||
// Every `BlindCheckable` is also a `StaticCheckable` for arbitrary `Context`.
|
||||
impl<T: BlindCheckable, Context> Checkable<Context> for T {
|
||||
type Checked = <Self as BlindCheckable>::Checked;
|
||||
|
||||
fn check(self, signature: CheckSignature, _c: &Context) -> Result<Self::Checked, TransactionValidityError> {
|
||||
BlindCheckable::check(self, signature)
|
||||
fn check(self, _c: &Context) -> Result<Self::Checked, TransactionValidityError> {
|
||||
BlindCheckable::check(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user