Tagged transaction queue integration (#893)

* Make the graph generic.

* Adapting pool API for the graph.

* Merge pool & graph.

* Restructure.

* Fix test of transaction pool.

* Get rid of node/transaction-pool.

* Compilation fixes.

* Test7

* Fix compilation of tests.

* Revert runtime changes.

* Add validate_transaction to test-runtime.

* Fix RPC tests.

* Add clearing of the old transactions.

* Trigger pool events.

* Use new queue API.

* Fix wasm build, re-export Hasher.

* No warning if validate transaction fails.

* Get rid of Into<u64> and use As
This commit is contained in:
Tomasz Drwięga
2018-10-12 13:09:35 +02:00
committed by Gav Wood
parent 2404d3c89f
commit 671b0e0007
48 changed files with 1234 additions and 1524 deletions
+8 -1
View File
@@ -55,7 +55,7 @@ use codec::{Encode, Decode};
use runtime_api::runtime::*;
use runtime_primitives::traits::{BlindCheckable, BlakeTwo256, Block as BlockT};
use runtime_primitives::{ApplyResult, Ed25519Signature};
use runtime_primitives::{ApplyResult, Ed25519Signature, transaction_validity::TransactionValidity};
use runtime_version::RuntimeVersion;
pub use primitives::hash::H256;
use primitives::AuthorityId;
@@ -159,6 +159,7 @@ mod test_api {
}
}
}
use test_api::runtime::TestAPI;
struct Runtime;
@@ -178,6 +179,12 @@ impl_apis! {
}
}
impl TaggedTransactionQueue<Block, TransactionValidity> for Runtime {
fn validate_transaction(utx: <Block as BlockT>::Extrinsic) -> TransactionValidity {
system::validate_transaction(utx)
}
}
impl BlockBuilder<Block, u32, u32> for Runtime {
fn initialise_block(header: <Block as BlockT>::Header) {
system::initialise_block(header)