Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
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
use <UncheckedExtrinsic as Checkable>::Checked
  • Loading branch information
snd committed Jul 9, 2018
commit 21676fe8a80c52fb68c8b1d0e2f5dd5811f2c529
2 changes: 0 additions & 2 deletions polkadot/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ pub type Address = staking::Address<Concrete>;
pub type BlockId = generic::BlockId<Block>;
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Index, Call, Signature>;
/// Checked extrinsic type as expected by this runtime.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Index, Call>;
/// Extrinsic type as expected by this runtime. This is not the type that is signed.
pub type Extrinsic = generic::Extrinsic<Address, Index, Call>;
/// Extrinsic type that is signed.
Expand Down
5 changes: 4 additions & 1 deletion polkadot/transaction-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ use extrinsic_pool::{Pool, Listener, txpool::{self, Readiness, scoring::{Change,
use extrinsic_pool::api::ExtrinsicPool;
use polkadot_api::PolkadotApi;
use primitives::{AccountId, BlockId, Hash, Index, UncheckedExtrinsic as FutureProofUncheckedExtrinsic};
use runtime::{Address, UncheckedExtrinsic, CheckedExtrinsic};
use runtime::{Address, UncheckedExtrinsic};
use substrate_runtime_primitives::traits::{Bounded, Checkable, Hashing, BlakeTwo256};

pub use extrinsic_pool::txpool::{Options, Status, LightStatus, VerifiedTransaction as VerifiedTransactionOps};
pub use error::{Error, ErrorKind, Result};

/// Type alias for convenience.
pub type CheckedExtrinsic = <UncheckedExtrinsic as Checkable<fn(Address) -> std::result::Result<AccountId, &'static str>>>::Checked;

/// A verified transaction which should be includable and non-inherent.
#[derive(Clone, Debug)]
pub struct VerifiedTransaction {
Expand Down