paradigmxyz / reth

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

make map_discv5_config_builder more ergonomic #9060

Closed mattsse closed 1 month ago

mattsse commented 2 months ago

Describe the feature

https://github.com/paradigmxyz/reth/blob/e78e7261ded753451d004b0f5e79740e0121e614/crates/net/network/src/config.rs#L428-L428

this call has been the root cause for this regression and is a bit confusing https://github.com/paradigmxyz/reth/pull/9058#event-13268610457

ideally this function is removed and combined with the setter:

https://github.com/paradigmxyz/reth/blob/e78e7261ded753451d004b0f5e79740e0121e614/crates/optimism/node/src/node.rs#L291-L291

bonus points for an additional test

Additional context

No response

yutianwu commented 2 months ago

Do u mean we remove the map function and use setters when we initialize the builder like this?

image