Introduce CheckNonZeroSender (#10413)

* Introduce CheckNonZeroSender

* Missing file

* Formatting

* Fixes

* Formatting

* some fixes to compile

* Update frame/system/src/extensions/check_non_zero_sender.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Fixes

* Fixes

* another fix

* Formatting

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Gavin Wood
2021-12-08 11:28:03 +01:00
committed by GitHub
parent 4855eb6c40
commit 4b34b041b8
10 changed files with 118 additions and 4 deletions
@@ -79,6 +79,8 @@ pub enum InvalidTransaction {
/// A transaction with a mandatory dispatch. This is invalid; only inherent extrinsics are
/// allowed to have mandatory dispatches.
MandatoryDispatch,
/// The sending address is disabled or known to be invalid.
BadSigner,
}
impl InvalidTransaction {
@@ -109,6 +111,7 @@ impl From<InvalidTransaction> for &'static str {
InvalidTransaction::MandatoryDispatch =>
"Transaction dispatch is mandatory; transactions may not have mandatory dispatches.",
InvalidTransaction::Custom(_) => "InvalidTransaction custom error",
InvalidTransaction::BadSigner => "Invalid signing address",
}
}
}