Skip to content

Commit

Permalink
WIP init_chain: tell cometBFT the max_age_num_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Sep 16, 2023
1 parent f6fdcf7 commit 7c8dfb0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/src/lib/node/ledger/shell/init_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 7c8dfb0

Please sign in to comment.