Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7937af9
runtime: refactor Checkable and BlindCheckable traits
snd Jul 5, 2018
cf080b0
fix impl BlindCheckable for Extrinsic
snd Jul 5, 2018
0b2ff34
fix impl Checkable for TestXt
snd Jul 5, 2018
d277169
fix impl Checkable for UncheckedExtrinsic
snd Jul 5, 2018
60a9e0c
fix tabs
snd Jul 5, 2018
02eb103
add ::Address to system::Trait since its no longer in Checkable trait
snd Jul 6, 2018
b42b484
replace tab by space in comment
snd Jul 6, 2018
05fe805
replace occurences of Checkable::check with ::check_with
snd Jul 6, 2018
6a90ab5
tx-pool: replace CheckedIntrinsic type alias since it now would requi…
snd Jul 6, 2018
de69b7a
make more uses of Checkable compile
snd Jul 6, 2018
574b2a8
adapt Executive impl to new Checkable trait
snd Jul 6, 2018
8da0a5a
fix that CheckedExtrinsic takes AccountId not Address as first type p…
snd Jul 6, 2018
7cccc1d
Checkable trait: return error again since it's required in some cases
snd Jul 6, 2018
b147c0a
Checkable: improve docstrings
snd Jul 6, 2018
7642b81
consistent punctuation and capitalization in docstrings
snd Jul 7, 2018
70ab210
Ctx -> Context
snd Jul 9, 2018
f4fcebb
reduce trait bounds for impl Checkable for TestXt
snd Jul 9, 2018
21676fe
use <UncheckedExtrinsic as Checkable>::Checked
snd Jul 9, 2018
2e3e4a8
Revert "add ::Address to system::Trait since its no longer in Checkab…
snd Jul 9, 2018
6e550d8
runtime/executive: properly fix that Address no longer in Checkable
snd Jul 9, 2018
eef85e1
return `Result<Self::Checked, &'static str>` from `Checkable::check`
snd Jul 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix impl BlindCheckable for Extrinsic
  • Loading branch information
snd committed Jul 5, 2018
commit cf080b099fe6989749f7582df89b970217fc20d0
8 changes: 2 additions & 6 deletions substrate/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,12 @@ impl Slicable for Extrinsic {

impl BlindCheckable for Extrinsic {
type Checked = Self;
type Address = AccountId;

fn sender(&self) -> &Self::Address {
&self.transfer.from
}
fn check(self) -> Result<Self, &'static str> {
fn check(self) -> Result<Self, Self> {
if ::runtime_primitives::verify_encoded_lazy(&self.signature, &self.transfer, &self.transfer.from) {
Ok(self)
} else {
Err("bad signature")
Err(self)
}
}
}
Expand Down