-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add client update
command for Cosmos chains
#151
Conversation
let height = reference_chain | ||
.with_blocking_chain_handle(|handle| { | ||
handle | ||
.query_latest_height() | ||
.map_err(|e| BaseError::relayer(e).into()) | ||
}) | ||
.await | ||
.wrap_err("Failed to fetch latest height on reference chain")?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use CanQueryChainHeight
to query the latest chain height here.
let height = reference_chain | |
.with_blocking_chain_handle(|handle| { | |
handle | |
.query_latest_height() | |
.map_err(|e| BaseError::relayer(e).into()) | |
}) | |
.await | |
.wrap_err("Failed to fetch latest height on reference chain")?; | |
let height = reference_chain.query_chain_height().await?; |
let reference_chain_id = client_state.chain_id; | ||
let reference_chain = builder.build_chain(&reference_chain_id).await?; | ||
|
||
let relayer = CanBuildRelay::build_relay( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rename CosmosBuilder::build_relay
to CosmosBuilder::build_cosmos_relay
, so that we can use builder.build_relay()
here without the method name ambiguity.
// help_heading = "Update the client across a genesis restart", | ||
// help = "The height that the chain underwent a genesis restart at. Requires --archive-address if used." | ||
// )] | ||
// restart_height: Option<u64>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the commented CLI options for now.
Closes: #144
Description
Not all arguments of its v1 counterpart have been implemented yet. We can do this in a separate pass.
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.