From b8492b9ad64a88198e3f11ad8fb818bef815f94f Mon Sep 17 00:00:00 2001 From: brentstone Date: Fri, 20 Sep 2024 20:31:59 -0700 Subject: [PATCH] enforce min commission on pre-genesis validators at init-chain --- crates/node/src/shell/init_chain.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/node/src/shell/init_chain.rs b/crates/node/src/shell/init_chain.rs index 05624f1871..6a5bcb5cbc 100644 --- a/crates/node/src/shell/init_chain.rs +++ b/crates/node/src/shell/init_chain.rs @@ -635,7 +635,10 @@ where eth_cold_key: ð_cold_key.pk.raw, eth_hot_key: ð_hot_key.pk.raw, current_epoch, - commission_rate: *commission_rate, + commission_rate: std::cmp::max( + *commission_rate, + params.min_commission_rate, + ), max_commission_rate_change: *max_commission_rate_change, metadata: metadata.clone(),