From e591b4481b85398ab543bc311de5797fb1bc7786 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Tue, 14 Feb 2017 19:16:46 +0100 Subject: [PATCH] warning on detected inconsistency --- ethcore/light/src/transaction_queue.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ethcore/light/src/transaction_queue.rs b/ethcore/light/src/transaction_queue.rs index 50d6a918e..8ca6a64f6 100644 --- a/ethcore/light/src/transaction_queue.rs +++ b/ethcore/light/src/transaction_queue.rs @@ -234,8 +234,14 @@ impl TransactionQueue { Some(Condition::Timestamp(time)) => time <= best_block_timestamp, }).map(|info| info.hash) }) - .filter_map(|hash| self.by_hash.get(&hash)) - .cloned() + .filter_map(|hash| match self.by_hash.get(&hash) { + Some(tx) => Some(tx.clone()), + None => { + warn!(target: "txqueue", "Inconsistency detected between `by_hash` and `by_account`: {} not stored.", + hash); + None + } + }) .collect() }