From 883e9ae8ccf36c87710af2f5662e7e7ef5e41ef7 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 17 Feb 2026 02:40:46 +0100 Subject: [PATCH] feat(node-core): add `with_dev_block_time` helper to `NodeConfig` (#22251) Co-authored-by: Amp --- .changelog/odd-snails-play.md | 5 +++++ crates/node/core/src/node_config.rs | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 .changelog/odd-snails-play.md diff --git a/.changelog/odd-snails-play.md b/.changelog/odd-snails-play.md new file mode 100644 index 0000000000..c2ea3cea2a --- /dev/null +++ b/.changelog/odd-snails-play.md @@ -0,0 +1,5 @@ +--- +reth-node-core: minor +--- + +Added `with_dev_block_time` helper method to `NodeConfig` for configuring dev miner block production interval. diff --git a/crates/node/core/src/node_config.rs b/crates/node/core/src/node_config.rs index 74fe41d324..5b8910ab7f 100644 --- a/crates/node/core/src/node_config.rs +++ b/crates/node/core/src/node_config.rs @@ -343,6 +343,14 @@ impl NodeConfig { self } + /// Set the dev block time for the node. + /// + /// This sets the interval at which the dev miner produces new blocks. + pub const fn with_dev_block_time(mut self, block_time: std::time::Duration) -> Self { + self.dev.block_time = Some(block_time); + self + } + /// Set the pruning args for the node pub fn with_pruning(mut self, pruning: PruningArgs) -> Self { self.pruning = pruning;