Skip to content

fix(txpool): remove redundant Worst() calls in queued pool discard loop#18810

Merged
taratorio merged 1 commit into
erigontech:mainfrom
Bilogweb3:fix/txpool-remove-redundant-worst-calls
Jan 27, 2026
Merged

fix(txpool): remove redundant Worst() calls in queued pool discard loop#18810
taratorio merged 1 commit into
erigontech:mainfrom
Bilogweb3:fix/txpool-remove-redundant-worst-calls

Conversation

@Bilogweb3
Copy link
Copy Markdown
Contributor

The loop for discarding transactions from queued sub pool was calling Worst() twice per iteration with results discarded. This is dead code since Worst() has no side effects - it just returns the first element.

The two similar loops above (for pending and baseFee pools) don't have this issue, so this also makes the code consistent.

@taratorio taratorio enabled auto-merge (squash) January 27, 2026 03:22
@taratorio taratorio merged commit 5d444a2 into erigontech:main Jan 27, 2026
16 checks passed
mattevans added a commit to ethpandaops/erigone-legacy that referenced this pull request Jan 28, 2026
* main: (37 commits)
  Make `lastCommittedTxNum` atomic (erigontech#18820)
  integrity: fix redundant variable name in checkLogIdx (erigontech#18646)
  Fixed index building for v0 snapshot format (erigontech#18825)
  execution/vm: fold EVMInterpreter into EVM (erigontech#18765)
  fix: return correct prune mode value instead of nil (erigontech#18804)
  fix BuildMissedAccessors for caplin state (erigontech#18802)
  execution: EIP-7708: ETH transfers emit a log (erigontech#18761)
  refactor(rpc): remove redundant boolean comparison in AccountRange (erigontech#18814)
  Show the default P2P discovery bools in --help (erigontech#18818)
  fix(txpool): remove redundant Worst() calls in queued pool discard loop (erigontech#18810)
  node: remove unused logger and test helper (erigontech#18744)
  Disabled compression in collate function (erigontech#18813)
  Add missing tx.Commit() in stage_snapshots (erigontech#18816)
  Bumped major version of snapshot files (erigontech#18815)
  qa-tests: summary for RPC integration tests (erigontech#18809)
  perf: reuse hash buffer in witness storage leaf hash (erigontech#18803)
  execution/stagedsync: remove canPrune from serial_exec (erigontech#18800)
  Fixed deduplication intervals for rebuild cmd (erigontech#18796)
  Fix race due to warmup cache (erigontech#18799)
  fix(txpool): use instance logger instead of global log (erigontech#18797)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants