@@ -1104,13 +1104,9 @@ impl Config {
1104
1104
} ,
1105
1105
miner_status,
1106
1106
confirm_microblocks : false ,
1107
- max_execution_time : if let Some ( max_execution_time_secs) =
1108
- miner_config. max_execution_time
1109
- {
1110
- Some ( Duration :: from_secs ( max_execution_time_secs) )
1111
- } else {
1112
- None
1113
- } ,
1107
+ max_execution_time : miner_config
1108
+ . max_execution_time_secs
1109
+ . map ( Duration :: from_secs) ,
1114
1110
}
1115
1111
}
1116
1112
@@ -1153,13 +1149,9 @@ impl Config {
1153
1149
} ,
1154
1150
miner_status,
1155
1151
confirm_microblocks : true ,
1156
- max_execution_time : if let Some ( max_execution_time_secs) =
1157
- miner_config. max_execution_time
1158
- {
1159
- Some ( Duration :: from_secs ( max_execution_time_secs) )
1160
- } else {
1161
- None
1162
- } ,
1152
+ max_execution_time : miner_config
1153
+ . max_execution_time_secs
1154
+ . map ( Duration :: from_secs) ,
1163
1155
}
1164
1156
}
1165
1157
@@ -2192,7 +2184,7 @@ pub struct MinerConfig {
2192
2184
/// Define the timeout to apply while waiting for signers responses, based on the amount of rejections
2193
2185
pub block_rejection_timeout_steps : HashMap < u32 , Duration > ,
2194
2186
/// Define max execution time for contract calls: transactions taking more than the specified amount of seconds will be rejected
2195
- pub max_execution_time : Option < u64 > ,
2187
+ pub max_execution_time_secs : Option < u64 > ,
2196
2188
}
2197
2189
2198
2190
impl Default for MinerConfig {
@@ -2242,7 +2234,7 @@ impl Default for MinerConfig {
2242
2234
rejections_timeouts_default_map. insert ( 30 , Duration :: from_secs ( 0 ) ) ;
2243
2235
rejections_timeouts_default_map
2244
2236
} ,
2245
- max_execution_time : None ,
2237
+ max_execution_time_secs : None ,
2246
2238
}
2247
2239
}
2248
2240
}
@@ -2642,7 +2634,7 @@ pub struct MinerConfigFile {
2642
2634
pub tenure_timeout_secs : Option < u64 > ,
2643
2635
pub tenure_extend_cost_threshold : Option < u64 > ,
2644
2636
pub block_rejection_timeout_steps : Option < HashMap < String , u64 > > ,
2645
- pub max_execution_time : Option < u64 > ,
2637
+ pub max_execution_time_secs : Option < u64 > ,
2646
2638
}
2647
2639
2648
2640
impl MinerConfigFile {
@@ -2806,7 +2798,7 @@ impl MinerConfigFile {
2806
2798
}
2807
2799
} ,
2808
2800
2809
- max_execution_time : self . max_execution_time
2801
+ max_execution_time_secs : self . max_execution_time_secs
2810
2802
} )
2811
2803
}
2812
2804
}
0 commit comments