Skip to content

Commit 5b57840

Browse files
committed
fix: default emission_weight=0.0 and max_cpu_secs=1800 for new challenges
1 parent b9b2f62 commit 5b57840

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

crates/core/src/challenge.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ impl Default for ChallengeConfig {
121121
mechanism_id: 0, // Default to mechanism 0 (main mechanism)
122122
timeout_secs: 300,
123123
max_memory_mb: 512,
124-
max_cpu_secs: 60,
125-
emission_weight: 1.0,
124+
max_cpu_secs: 1800,
125+
emission_weight: 0.0,
126126
min_validators: 1,
127127
params_json: "{}".to_string(),
128128
wasm: WasmConfig::default(),
@@ -375,7 +375,7 @@ mod tests {
375375
assert_eq!(config.mechanism_id, 5);
376376
assert_eq!(config.timeout_secs, 300); // Should have other defaults
377377
assert_eq!(config.max_memory_mb, 512);
378-
assert_eq!(config.emission_weight, 1.0);
378+
assert_eq!(config.emission_weight, 0.0);
379379
}
380380

381381
#[test]
@@ -384,8 +384,8 @@ mod tests {
384384
assert_eq!(config.mechanism_id, 0);
385385
assert_eq!(config.timeout_secs, 300);
386386
assert_eq!(config.max_memory_mb, 512);
387-
assert_eq!(config.max_cpu_secs, 60);
388-
assert_eq!(config.emission_weight, 1.0);
387+
assert_eq!(config.max_cpu_secs, 1800);
388+
assert_eq!(config.emission_weight, 0.0);
389389
assert_eq!(config.min_validators, 1);
390390
assert_eq!(config.params_json, "{}");
391391
assert!(config.wasm.restart_id.is_empty());

0 commit comments

Comments
 (0)