mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
Fix executive test (#7243)
* fix executive test * add unallowed unsigned test * better to have also unsigned pre_dispatch check tested
This commit is contained in:
committed by
GitHub
parent
a2c4b38eb6
commit
a31637def8
@@ -313,11 +313,17 @@ impl<Origin, Call, Extra> Applyable for TestXt<Call, Extra> where
|
||||
/// Checks to see if this is a valid *transaction*. It returns information on it if so.
|
||||
fn validate<U: ValidateUnsigned<Call=Self::Call>>(
|
||||
&self,
|
||||
_source: TransactionSource,
|
||||
_info: &DispatchInfoOf<Self::Call>,
|
||||
_len: usize,
|
||||
source: TransactionSource,
|
||||
info: &DispatchInfoOf<Self::Call>,
|
||||
len: usize,
|
||||
) -> TransactionValidity {
|
||||
Ok(Default::default())
|
||||
if let Some((ref id, ref extra)) = self.signature {
|
||||
Extra::validate(extra, id, &self.call, info, len)
|
||||
} else {
|
||||
let valid = Extra::validate_unsigned(&self.call, info, len)?;
|
||||
let unsigned_validation = U::validate_unsigned(source, &self.call)?;
|
||||
Ok(valid.combine_with(unsigned_validation))
|
||||
}
|
||||
}
|
||||
|
||||
/// Executes all necessary logic needed prior to dispatch and deconstructs into function call,
|
||||
@@ -332,6 +338,7 @@ impl<Origin, Call, Extra> Applyable for TestXt<Call, Extra> where
|
||||
Some(who)
|
||||
} else {
|
||||
Extra::pre_dispatch_unsigned(&self.call, info, len)?;
|
||||
U::pre_dispatch(&self.call)?;
|
||||
None
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user