From 26283291d02041ac444f607cadaee40889b7457b Mon Sep 17 00:00:00 2001 From: Guanghua Guo Date: Tue, 28 Aug 2018 17:54:22 +0800 Subject: [PATCH] update substrate/extrinsic-pool (#616) --- Cargo.lock | 8 ++++---- substrate/extrinsic-pool/Cargo.toml | 2 +- substrate/extrinsic-pool/src/listener.rs | 2 +- substrate/extrinsic-pool/src/pool.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7214eed86976e..6fafdb2b69d3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1918,7 +1918,7 @@ dependencies = [ "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2497,7 +2497,7 @@ dependencies = [ "substrate-keyring 0.1.0", "substrate-runtime-primitives 0.1.0", "substrate-test-client 0.1.0", - "transaction-pool 1.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "transaction-pool 1.13.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3367,7 +3367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "transaction-pool" -version = "1.12.3" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3976,7 +3976,7 @@ dependencies = [ "checksum tokio-udp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "137bda266504893ac4774e0ec4c2108f7ccdbcb7ac8dced6305fe9e4e0b5041a" "checksum trace-time 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5aea07da6582e957c6e737eeb63a5af79e648eeeaaaba8fd9a417f1124bafa41" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum transaction-pool 1.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0f1fc049d9f039d3e9264f97f978309b94b5a5c56a5c18d28f91f469cef2b367" +"checksum transaction-pool 1.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fdb8870eea404a57e2f62056ac45067a53a6207fd31866122356481d3c2e1a30" "checksum triehash 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2033893a813c70e7d8a739ca6c36dc0a7a2c913ec718d7cbf84a3837bbe3c7ce" "checksum triehash 0.2.0 (git+https://github.com/paritytech/parity-common)" = "" "checksum try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2" diff --git a/substrate/extrinsic-pool/Cargo.toml b/substrate/extrinsic-pool/Cargo.toml index b31c49c8f6ca1..ba62e6a382e0f 100644 --- a/substrate/extrinsic-pool/Cargo.toml +++ b/substrate/extrinsic-pool/Cargo.toml @@ -10,7 +10,7 @@ error-chain = "0.12" futures = "0.1" log = "0.3" parking_lot = "0.4" -transaction-pool = "1.12" +transaction-pool = "1.13.2" substrate-runtime-primitives = { path = "../../substrate/runtime/primitives" } [dev-dependencies] diff --git a/substrate/extrinsic-pool/src/listener.rs b/substrate/extrinsic-pool/src/listener.rs index 339c2ff8400a4..8badb331a5b64 100644 --- a/substrate/extrinsic-pool/src/listener.rs +++ b/substrate/extrinsic-pool/src/listener.rs @@ -87,7 +87,7 @@ impl txpool::Listener for Listener where debug!(target: "extrinsic-pool", "Extrinsic canceled: {:?}", tx); } - fn mined(&mut self, tx: &Arc) { + fn culled(&mut self, tx: &Arc) { // TODO [ToDr] latest block number? let header_hash = Default::default(); self.fire(tx.hash(), |watcher| watcher.finalised(header_hash)) diff --git a/substrate/extrinsic-pool/src/pool.rs b/substrate/extrinsic-pool/src/pool.rs index fb59756479883..100fa700e4c5f 100644 --- a/substrate/extrinsic-pool/src/pool.rs +++ b/substrate/extrinsic-pool/src/pool.rs @@ -93,7 +93,7 @@ pub trait ChainApi: Send + Sync { /// Error type. type Error: From + IntoPoolError; /// Score type. - type Score: ::std::cmp::Ord + Clone + Default + fmt::Debug + Send + Send + Sync; + type Score: ::std::cmp::Ord + Clone + Default + fmt::Debug + Send + Send + Sync + fmt::LowerHex; /// Custom scoring update event type. type Event: ::std::fmt::Debug; /// Verify extrinsic at given block.