@@ -86,7 +86,7 @@ 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_MINIMUM_GAP_SECS : u64 = 1 ;
89
+ const DEFAULT_MINIMUM_GAP_MS : u64 = 1000 ;
90
90
91
91
#[ derive( Clone , Deserialize , Default , Debug ) ]
92
92
pub struct ConfigFile {
@@ -2359,9 +2359,9 @@ pub struct MinerConfig {
2359
2359
pub wait_on_signers : Duration ,
2360
2360
/// Whether to mock sign in Epoch 2.5 through the .miners and .signers contracts. This is used for testing purposes in Epoch 2.5 only.
2361
2361
pub pre_nakamoto_mock_signing : bool ,
2362
- /// The minimum gap to wait between blocks in seconds . The value must be greater than or equal to 1 second because if a block is mined
2362
+ /// The minimum gap to wait between blocks in milliseconds . The value must be greater than or equal to 1000 ms because if a block is mined
2363
2363
/// within the same second as its parent, it will be rejected by the signers.
2364
- pub min_block_time_gap_secs : u64 ,
2364
+ pub min_block_time_gap_ms : u64 ,
2365
2365
}
2366
2366
2367
2367
impl Default for MinerConfig {
@@ -2393,7 +2393,7 @@ impl Default for MinerConfig {
2393
2393
// TODO: update to a sane value based on stackerdb benchmarking
2394
2394
wait_on_signers : Duration :: from_secs ( 200 ) ,
2395
2395
pre_nakamoto_mock_signing : false , // Should only default true if mining key is set
2396
- min_block_time_gap_secs : DEFAULT_MINIMUM_GAP_SECS ,
2396
+ min_block_time_gap_ms : DEFAULT_MINIMUM_GAP_MS ,
2397
2397
}
2398
2398
}
2399
2399
}
@@ -2744,7 +2744,7 @@ pub struct MinerConfigFile {
2744
2744
pub max_reorg_depth : Option < u64 > ,
2745
2745
pub wait_on_signers_ms : Option < u64 > ,
2746
2746
pub pre_nakamoto_mock_signing : Option < bool > ,
2747
- pub min_block_time_gap_secs : Option < u64 > ,
2747
+ pub min_block_time_gap_ms : Option < u64 > ,
2748
2748
}
2749
2749
2750
2750
impl MinerConfigFile {
@@ -2856,12 +2856,12 @@ impl MinerConfigFile {
2856
2856
pre_nakamoto_mock_signing : self
2857
2857
. pre_nakamoto_mock_signing
2858
2858
. unwrap_or ( pre_nakamoto_mock_signing) , // Should only default true if mining key is set
2859
- min_block_time_gap_secs : self . min_block_time_gap_secs . map ( |secs | if secs < DEFAULT_MINIMUM_GAP_SECS {
2860
- warn ! ( "miner.min_block_time_gap_secs is less than the minimum allowed value of {DEFAULT_MINIMUM_GAP_SECS} secs . Using the default value instead." ) ;
2861
- DEFAULT_MINIMUM_GAP_SECS
2859
+ min_block_time_gap_ms : self . min_block_time_gap_ms . map ( |ms | if ms < DEFAULT_MINIMUM_GAP_MS {
2860
+ warn ! ( "miner.min_block_time_gap_ms is less than the minimum allowed value of {DEFAULT_MINIMUM_GAP_MS} ms . Using the default value instead." ) ;
2861
+ DEFAULT_MINIMUM_GAP_MS
2862
2862
} else {
2863
- secs
2864
- } ) . unwrap_or ( miner_default_config. min_block_time_gap_secs ) ,
2863
+ ms
2864
+ } ) . unwrap_or ( miner_default_config. min_block_time_gap_ms ) ,
2865
2865
} )
2866
2866
}
2867
2867
}
0 commit comments