Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions client/basic-authorship/src/basic_authorship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ impl<A, B, Block, C> Proposer<B, Block, C, A>

// proceed with transactions
let block_timer = time::Instant::now();
let mut is_first = true;
let mut skipped = 0;
let mut unqueue_invalid = Vec::new();
let pending_iterator = match executor::block_on(future::select(
Expand Down Expand Up @@ -261,10 +260,7 @@ impl<A, B, Block, C> Proposer<B, Block, C, A>
}
Err(ApplyExtrinsicFailed(Validity(e)))
if e.exhausted_resources() => {
if is_first {
debug!("[{:?}] Invalid transaction: FullBlock on empty block", pending_tx_hash);
unqueue_invalid.push(pending_tx_hash);
} else if skipped < MAX_SKIPPED_TRANSACTIONS {
if skipped < MAX_SKIPPED_TRANSACTIONS {
skipped += 1;
debug!(
"Block seems full, but will try {} more transactions before quitting.",
Expand All @@ -287,8 +283,6 @@ impl<A, B, Block, C> Proposer<B, Block, C, A>
unqueue_invalid.push(pending_tx_hash);
}
}

is_first = false;
}

self.transaction_pool.remove_invalid(&unqueue_invalid);
Expand Down