mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 18:31:05 +00:00
Remove sender from Applyable. (#5129)
This commit is contained in:
@@ -118,7 +118,7 @@ impl<
|
|||||||
where
|
where
|
||||||
Block::Extrinsic: Checkable<Context> + Codec,
|
Block::Extrinsic: Checkable<Context> + Codec,
|
||||||
CheckedOf<Block::Extrinsic, Context>:
|
CheckedOf<Block::Extrinsic, Context>:
|
||||||
Applyable<AccountId=System::AccountId, DispatchInfo=DispatchInfo> +
|
Applyable<DispatchInfo=DispatchInfo> +
|
||||||
GetDispatchInfo,
|
GetDispatchInfo,
|
||||||
CallOf<Block::Extrinsic, Context>: Dispatchable,
|
CallOf<Block::Extrinsic, Context>: Dispatchable,
|
||||||
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
|
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
|
||||||
@@ -143,7 +143,7 @@ impl<
|
|||||||
where
|
where
|
||||||
Block::Extrinsic: Checkable<Context> + Codec,
|
Block::Extrinsic: Checkable<Context> + Codec,
|
||||||
CheckedOf<Block::Extrinsic, Context>:
|
CheckedOf<Block::Extrinsic, Context>:
|
||||||
Applyable<AccountId=System::AccountId, DispatchInfo=DispatchInfo> +
|
Applyable<DispatchInfo=DispatchInfo> +
|
||||||
GetDispatchInfo,
|
GetDispatchInfo,
|
||||||
CallOf<Block::Extrinsic, Context>: Dispatchable,
|
CallOf<Block::Extrinsic, Context>: Dispatchable,
|
||||||
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
|
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
|
||||||
|
|||||||
@@ -45,14 +45,9 @@ where
|
|||||||
Origin: From<Option<AccountId>>,
|
Origin: From<Option<AccountId>>,
|
||||||
Info: Clone,
|
Info: Clone,
|
||||||
{
|
{
|
||||||
type AccountId = AccountId;
|
|
||||||
type Call = Call;
|
type Call = Call;
|
||||||
type DispatchInfo = Info;
|
type DispatchInfo = Info;
|
||||||
|
|
||||||
fn sender(&self) -> Option<&Self::AccountId> {
|
|
||||||
self.signed.as_ref().map(|x| &x.0)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn validate<U: ValidateUnsigned<Call = Self::Call>>(
|
fn validate<U: ValidateUnsigned<Call = Self::Call>>(
|
||||||
&self,
|
&self,
|
||||||
info: Self::DispatchInfo,
|
info: Self::DispatchInfo,
|
||||||
|
|||||||
@@ -410,12 +410,9 @@ impl<Origin, Call, Extra, Info> Applyable for TestXt<Call, Extra> where
|
|||||||
Origin: From<Option<u64>>,
|
Origin: From<Option<u64>>,
|
||||||
Info: Clone,
|
Info: Clone,
|
||||||
{
|
{
|
||||||
type AccountId = u64;
|
|
||||||
type Call = Call;
|
type Call = Call;
|
||||||
type DispatchInfo = Info;
|
type DispatchInfo = Info;
|
||||||
|
|
||||||
fn sender(&self) -> Option<&Self::AccountId> { self.signature.as_ref().map(|x| &x.0) }
|
|
||||||
|
|
||||||
/// Checks to see if this is a valid *transaction*. It returns information on it if so.
|
/// Checks to see if this is a valid *transaction*. It returns information on it if so.
|
||||||
fn validate<U: ValidateUnsigned<Call=Self::Call>>(
|
fn validate<U: ValidateUnsigned<Call=Self::Call>>(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
@@ -879,18 +879,12 @@ impl SignedExtension for () {
|
|||||||
/// Also provides information on to whom this information is attributable and an index that allows
|
/// Also provides information on to whom this information is attributable and an index that allows
|
||||||
/// each piece of attributable information to be disambiguated.
|
/// each piece of attributable information to be disambiguated.
|
||||||
pub trait Applyable: Sized + Send + Sync {
|
pub trait Applyable: Sized + Send + Sync {
|
||||||
/// ID of the account that is responsible for this piece of information (sender).
|
|
||||||
type AccountId: Member + MaybeDisplay;
|
|
||||||
|
|
||||||
/// Type by which we can dispatch. Restricts the `UnsignedValidator` type.
|
/// Type by which we can dispatch. Restricts the `UnsignedValidator` type.
|
||||||
type Call;
|
type Call;
|
||||||
|
|
||||||
/// An opaque set of information attached to the transaction.
|
/// An opaque set of information attached to the transaction.
|
||||||
type DispatchInfo: Clone;
|
type DispatchInfo: Clone;
|
||||||
|
|
||||||
/// Returns a reference to the sender if any.
|
|
||||||
fn sender(&self) -> Option<&Self::AccountId>;
|
|
||||||
|
|
||||||
/// Checks to see if this is a valid *transaction*. It returns information on it if so.
|
/// Checks to see if this is a valid *transaction*. It returns information on it if so.
|
||||||
fn validate<V: ValidateUnsigned<Call=Self::Call>>(
|
fn validate<V: ValidateUnsigned<Call=Self::Call>>(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
Reference in New Issue
Block a user