feat(node-core): add with_dev_block_time helper to NodeConfig (#22251)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Matthias Seitz
2026-02-17 02:40:46 +01:00
committed by GitHub
parent a1e4132c2d
commit 883e9ae8cc
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
reth-node-core: minor
---
Added `with_dev_block_time` helper method to `NodeConfig` for configuring dev miner block production interval.

View File

@@ -343,6 +343,14 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
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;