mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
feat(node-core): add with_dev_block_time helper to NodeConfig (#22251)
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
5
.changelog/odd-snails-play.md
Normal file
5
.changelog/odd-snails-play.md
Normal 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.
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user