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;