@@ -86,7 +86,9 @@ pub const OP_TX_ANY_ESTIM_SIZE: u64 = fmax!(
86
86
const DEFAULT_MAX_RBF_RATE : u64 = 150 ; // 1.5x
87
87
const DEFAULT_RBF_FEE_RATE_INCREMENT : u64 = 5 ;
88
88
const INV_REWARD_CYCLES_TESTNET : u64 = 6 ;
89
- const DEFAULT_MIN_TIME_BETWEEN_BLOCKS_MS : u64 = 1000 ;
89
+ const DEFAULT_MIN_TIME_BETWEEN_BLOCKS_MS : u64 = 1_000 ;
90
+ const DEFAULT_FIRST_REJECTION_PAUSE_MS : u64 = 5_000 ;
91
+ const DEFAULT_SUBSEQUENT_REJECTION_PAUSE_MS : u64 = 10_000 ;
90
92
91
93
#[ derive( Clone , Deserialize , Default , Debug ) ]
92
94
#[ serde( deny_unknown_fields) ]
@@ -2183,6 +2185,10 @@ pub struct MinerConfig {
2183
2185
/// The minimum time to wait between mining blocks in milliseconds. The value must be greater than or equal to 1000 ms because if a block is mined
2184
2186
/// within the same second as its parent, it will be rejected by the signers.
2185
2187
pub min_time_between_blocks_ms : u64 ,
2188
+ /// Time in milliseconds to pause after receiving the first threshold rejection, before proposing a new block.
2189
+ pub first_rejection_pause_ms : u64 ,
2190
+ /// Time in milliseconds to pause after receiving subsequent threshold rejections, before proposing a new block.
2191
+ pub subsequent_rejection_pause_ms : u64 ,
2186
2192
}
2187
2193
2188
2194
impl Default for MinerConfig {
@@ -2213,6 +2219,8 @@ impl Default for MinerConfig {
2213
2219
max_reorg_depth : 3 ,
2214
2220
pre_nakamoto_mock_signing : false , // Should only default true if mining key is set
2215
2221
min_time_between_blocks_ms : DEFAULT_MIN_TIME_BETWEEN_BLOCKS_MS ,
2222
+ first_rejection_pause_ms : DEFAULT_FIRST_REJECTION_PAUSE_MS ,
2223
+ subsequent_rejection_pause_ms : DEFAULT_SUBSEQUENT_REJECTION_PAUSE_MS ,
2216
2224
}
2217
2225
}
2218
2226
}
@@ -2575,6 +2583,8 @@ pub struct MinerConfigFile {
2575
2583
pub max_reorg_depth : Option < u64 > ,
2576
2584
pub pre_nakamoto_mock_signing : Option < bool > ,
2577
2585
pub min_time_between_blocks_ms : Option < u64 > ,
2586
+ pub first_rejection_pause_ms : Option < u64 > ,
2587
+ pub subsequent_rejection_pause_ms : Option < u64 > ,
2578
2588
}
2579
2589
2580
2590
impl MinerConfigFile {
@@ -2688,6 +2698,8 @@ impl MinerConfigFile {
2688
2698
} else {
2689
2699
ms
2690
2700
} ) . unwrap_or ( miner_default_config. min_time_between_blocks_ms ) ,
2701
+ first_rejection_pause_ms : self . first_rejection_pause_ms . unwrap_or ( miner_default_config. first_rejection_pause_ms ) ,
2702
+ subsequent_rejection_pause_ms : self . subsequent_rejection_pause_ms . unwrap_or ( miner_default_config. subsequent_rejection_pause_ms ) ,
2691
2703
} )
2692
2704
}
2693
2705
}
0 commit comments