paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.99k stars 1.22k forks source link

tx-pool: add `all` method for `AllPoolTransactions` #12643

Closed tcoratger closed 3 days ago

tcoratger commented 3 days ago

At the moment it is quite difficult to obtain a global iterator over all transactions (both queued and pending). A all method is added to solve this.

tcoratger commented 3 days ago

where will this be used? preferably this pr plugs it in where it is needed to show its value, thanks

I find it useful in external circumstances like this one

https://github.com/kkrt-labs/kakarot-rpc/blob/ea35662c476a4d96d9a6104bc484785b2b22729e/src/pool/mempool.rs#L226-L230

Don't know if internally there is a precise usage for this. Feel free to merge or close if you find it useless.