From 7c8dfb018aa6b594f8a178e9118260772f8f85f4 Mon Sep 17 00:00:00 2001 From: brentstone Date: Fri, 15 Sep 2023 19:16:32 -0600 Subject: [PATCH] WIP init_chain: tell cometBFT the max_age_num_blocks --- apps/src/lib/node/ledger/shell/init_chain.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/src/lib/node/ledger/shell/init_chain.rs b/apps/src/lib/node/ledger/shell/init_chain.rs index b650e2d7309..5e274e64464 100644 --- a/apps/src/lib/node/ledger/shell/init_chain.rs +++ b/apps/src/lib/node/ledger/shell/init_chain.rs @@ -497,6 +497,14 @@ where .expect("Must be able to set genesis validator set"); debug_assert!(!response.validators.is_empty()); + // Communicate the max age num blocks to cometBFT + if let Some(consensus_params) = response.consensus_params.as_mut() { + if let Some(evidence_params) = consensus_params.evidence.as_mut() { + evidence_params.max_age_num_blocks = + pos_params.max_age_num_blocks as i64; + } + } + Ok(response) } }