Fix replace_previous of Ready Transaction Queue. (#4488)

* Fix transaction replacements.

* Test.

* Fix typo.

* Update client/transaction-pool/graph/src/ready.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Tomasz Drwięga
2019-12-24 11:13:29 +01:00
committed by Gavin Wood
parent 2403cf320c
commit b214b3f3e9
2 changed files with 136 additions and 61 deletions
@@ -274,7 +274,12 @@ impl<Hash: hash::Hash + Member + Serialize, Ex: std::fmt::Debug> BasePool<Hash,
&self.recently_pruned,
);
trace!(target: "txpool", "[{:?}] {:?}", tx.transaction.hash, tx);
debug!(target: "txpool", "[{:?}] Importing to {}", tx.transaction.hash, if tx.is_ready() { "ready" } else { "future" });
debug!(
target: "txpool",
"[{:?}] Importing to {}",
tx.transaction.hash,
if tx.is_ready() { "ready" } else { "future" }
);
// If all tags are not satisfied import to future.
if !tx.is_ready() {