Skip to content

Commit

Permalink
debug starknet client on cosmos
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Feb 5, 2025
1 parent 3e29dca commit 4be18cd
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,38 @@ fn test_starknet_light_client() -> Result<(), Error> {
cosmos_status = cosmos_chain.query_chain_status().await?;
}

info!(
"submitted Starknet client to Cosmos to height {}",
cosmos_status.height
);

{
let client_state = cosmos_chain
.query_client_state(
PhantomData::<CosmosChain>,
&cosmos_client_id,
&cosmos_chain.query_chain_height().await?,
)
.await?;

let consensus_state = cosmos_chain
.query_consensus_state(
PhantomData::<CosmosChain>,
&cosmos_client_id,
&Height::new(
client_state.latest_height.revision_number(),
client_state.latest_height.revision_height(),
)?,
&cosmos_chain.query_chain_height().await?,
)
.await?;

info!(
"after updating Starknet consensus state height {:?} and root: {:?} on Cosmos",
client_state.latest_height, consensus_state.root
);
}

let consensus_state = cosmos_chain
.query_consensus_state(
PhantomData::<StarknetChain>,
Expand Down

0 comments on commit 4be18cd

Please sign in to comment.