Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ledger: check pk in pre-genesis setup #1140

Merged
merged 4 commits into from
Mar 28, 2023

Conversation

Fraccaman
Copy link
Member

@Fraccaman Fraccaman commented Feb 9, 2023

Addressing #1091

@Fraccaman Fraccaman requested a review from tzemanovic February 9, 2023 17:18
@Fraccaman Fraccaman removed the request for review from tzemanovic February 9, 2023 17:48
@Fraccaman Fraccaman requested a review from tzemanovic February 13, 2023 11:58
@Fraccaman Fraccaman marked this pull request as ready for review February 14, 2023 14:34
&tendermint_node_key.ref_to(),
&genesis_config,
) {
println!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
println!(
eprintln!(

@@ -1058,3 +1070,16 @@ pub fn validator_pre_genesis_file(pre_genesis_path: &Path) -> PathBuf {
pub fn validator_pre_genesis_dir(base_dir: &Path, alias: &str) -> PathBuf {
base_dir.join(PRE_GENESIS_DIR).join(alias)
}

fn is_valid_validator_for_current_chain(
validator_pk: &common::PublicKey,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
validator_pk: &common::PublicKey,
tendermint_node_pk: &common::PublicKey,

) -> bool {
genesis_config.validator.iter().any(|(_alias, config)| {
if let Some(tm_node_key) = &config.tendermint_node_key {
tm_node_key.0.eq(&validator_pk.to_string())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tm_node_key.0.eq(&validator_pk.to_string())
tm_node_key.0.eq(&tendermint_node_pk.to_string())

tzemanovic
tzemanovic previously approved these changes Feb 15, 2023
Copy link
Member

@tzemanovic tzemanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thx!

@juped juped merged commit a8d17bb into main Mar 28, 2023
@juped juped deleted the fraccaman+grarco/check-pre-genesis-pk branch March 28, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants