Revalidate some transactions on every block import. (#4292)

* Revalidate some transactions on every block import.

* Fix endless loop in revalidate_ready.

* Clean up logging a bit.

* More clean ups.

* Print status after resubmitting.

* Remove env_logger.

* Remove redundant log.
This commit is contained in:
Tomasz Drwięga
2019-12-04 19:16:00 +01:00
committed by Gavin Wood
parent 925b23a3cd
commit 1628ba3388
6 changed files with 85 additions and 35 deletions
@@ -22,7 +22,7 @@ use std::{
};
use serde::Serialize;
use log::debug;
use log::trace;
use parking_lot::RwLock;
use sp_runtime::traits::Member;
use sp_runtime::transaction_validity::{
@@ -267,7 +267,7 @@ impl<Hash: hash::Hash + Member + Serialize, Ex> ReadyTransactions<Hash, Ex> {
to_remove.append(&mut tx.unlocks);
// add to removed
debug!(target: "txpool", "[{:?}] Removed as invalid: ", hash);
trace!(target: "txpool", "[{:?}] Removed as part of the subtree.", hash);
removed.push(tx.transaction.transaction);
}
}