add debug logs (#4657)

This commit is contained in:
Nikolay Volf
2020-01-17 13:18:38 +03:00
committed by Tomasz Drwięga
parent 482ca522cc
commit 26a53ac0a4
2 changed files with 5 additions and 1 deletions
@@ -205,6 +205,7 @@ impl<Block, B, E, RA, A> ProposerInner<Block, SubstrateClient<B, E, Block, RA>,
let pending_iterator = self.transaction_pool.ready();
debug!("Attempting to push transactions from the pool.");
debug!("Pool status: {:?}", self.transaction_pool.status());
for pending_tx in pending_iterator {
if (self.now)() > deadline {
debug!(
@@ -470,12 +470,15 @@ impl<B: ChainApi> ValidatedPool<B> {
return vec![]
}
debug!(target: "txpool", "Removing invalid transactions: {:?}", hashes);
// temporarily ban invalid transactions
debug!(target: "txpool", "Banning invalid transactions: {:?}", hashes);
self.rotator.ban(&time::Instant::now(), hashes.iter().cloned());
let invalid = self.pool.write().remove_subtree(hashes);
debug!(target: "txpool", "Removed invalid transactions: {:?}", invalid);
let mut listener = self.listener.write();
for tx in &invalid {
listener.invalid(&tx.hash, true);