Allow modules to validate transaction, second attempt (#2463)

* first impl

* rename origin::inherent to none

* fix

* fix

* Apply suggestions from code review

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* comment

* better error

* doc

* (add unsigned module 🤦)

* doc

* fix

* implement for node-template as well

* add validated unsigned to executor

* fix

* fix

* bump version

* testing xt

* remove extraneous logic

* licence

* impl test
This commit is contained in:
thiolliere authored and Gavin Wood committed 2019-05-10 14:13:04 +02:00
1 parent 4aa44ab280
commit dfbaedd535
22 files changed
+414 -85

No files matched your search

@@ -75,14 +75,14 @@ mod system {
pub enum RawOrigin<AccountId> {
Root,
Signed(AccountId),
Inherent,
None,
}
impl<AccountId> From<Option<AccountId>> for RawOrigin<AccountId> {
fn from(s: Option<AccountId>) -> RawOrigin<AccountId> {
match s {
Some(who) => RawOrigin::Signed(who),
None => RawOrigin::Inherent,
None => RawOrigin::None,
}
}
}