warning on detected inconsistency

This commit is contained in:
Robert Habermeier 2017-02-14 19:16:46 +01:00
parent 1d9db578ff
commit e591b4481b

View File

@ -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()
}