Issue 212 - refactor Checkable trait to be more generic (#287)
* runtime: refactor Checkable and BlindCheckable traits * fix impl BlindCheckable for Extrinsic * fix impl Checkable for TestXt * fix impl Checkable for UncheckedExtrinsic * fix tabs * add ::Address to system::Trait since its no longer in Checkable trait * replace tab by space in comment * replace occurences of Checkable::check with ::check_with * tx-pool: replace CheckedIntrinsic type alias since it now would require type param * make more uses of Checkable compile * adapt Executive impl to new Checkable trait * fix that CheckedExtrinsic takes AccountId not Address as first type param * Checkable trait: return error again since it's required in some cases * Checkable: improve docstrings * consistent punctuation and capitalization in docstrings * Ctx -> Context addresses https://github.com/paritytech/polkadot/pull/287#discussion_r200956240 * reduce trait bounds for impl Checkable for TestXt addresses https://github.com/paritytech/polkadot/pull/287#discussion_r200839303 * use <UncheckedExtrinsic as Checkable>::Checked addresses https://github.com/paritytech/polkadot/pull/287#discussion_r200955165 * Revert "add ::Address to system::Trait since its no longer in Checkable trait" This reverts commit 02eb103015b833c995c9f9067aac2542bb7ce5ea. * runtime/executive: properly fix that Address no longer in Checkable * return `Result<Self::Checked, &'static str>` from `Checkable::check`
Showing
- substrate/polkadot/runtime/src/utils.rs 1 addition, 1 deletionsubstrate/polkadot/runtime/src/utils.rs
- substrate/polkadot/transaction-pool/src/lib.rs 2 additions, 2 deletionssubstrate/polkadot/transaction-pool/src/lib.rs
- substrate/substrate/runtime/council/src/lib.rs 1 addition, 1 deletionsubstrate/substrate/runtime/council/src/lib.rs
- substrate/substrate/runtime/executive/src/lib.rs 5 additions, 4 deletionssubstrate/substrate/runtime/executive/src/lib.rs
- substrate/substrate/runtime/primitives/src/generic.rs 3 additions, 10 deletionssubstrate/substrate/runtime/primitives/src/generic.rs
- substrate/substrate/runtime/primitives/src/testing.rs 2 additions, 5 deletionssubstrate/substrate/runtime/primitives/src/testing.rs
- substrate/substrate/runtime/primitives/src/traits.rs 18 additions, 17 deletionssubstrate/substrate/runtime/primitives/src/traits.rs
- substrate/substrate/test-runtime/src/lib.rs 0 additions, 4 deletionssubstrate/substrate/test-runtime/src/lib.rs
Please register or sign in to comment