reth icon indicating copy to clipboard operation
reth copied to clipboard

Add base fee argument to `best_transactions`

Open mattsse opened this issue 2 years ago • 0 comments

Describe the feature

The iterator will only adhere to the current basefee of the pool

https://github.com/paradigmxyz/reth/blob/dfc63e524aad416a44807a24fb839c57d2c775e3/crates/transaction-pool/src/traits.rs#L102-L107

This may or may not be the same basefee of the block that the payload builder might target.

TODO

  • add another Iterator type that applies the base fee update on a copy of the subpools so the basefee condition is respected, but does not commit changes to the txpool itself.

perhaps this could even work by cloning the pending pool first, then applying updates similar to:

https://github.com/paradigmxyz/reth/blob/600f3eac8c494dfc10b628527ff87513e2381b7f/crates/transaction-pool/src/pool/txpool.rs#L131-L135 and then convert it into iterator

Additional context

No response

mattsse avatar Apr 21 '23 11:04 mattsse