Include latest block in trace
This commit is contained in:
parent
2a8380b8f4
commit
f4549aa790
3 changed files with 8 additions and 5 deletions
|
@ -9,9 +9,9 @@ block height and trusted height/hash.
|
|||
cargo run -- --chain-id osmosis-1 \
|
||||
--primary "http://127.0.0.1:26657" \
|
||||
--witnesses "http://127.0.0.1:26657" \
|
||||
--trusted-height 400 \
|
||||
--trusted-hash "DEA1738C2AEE72E935E39CE6EB8765B8782B791038789AC2FEA446526FDE8638" \
|
||||
--contract-address "wasm17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9jfksztgw5uh69wac2pgsm0v070" \
|
||||
--trusted-height 1 \
|
||||
--trusted-hash "798E237C6FDF39EDA8BA7AB8E8F5DC71F24BC7138BE31882338022F8F88086EE" \
|
||||
--contract-address "wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d" \
|
||||
--storage-key "requests" \
|
||||
--trace-file light-client-proof.json
|
||||
```
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -195,7 +195,7 @@ async fn main() -> Result<()> {
|
|||
}?;
|
||||
|
||||
info!("Verified to height {} on primary", primary_block.height());
|
||||
let primary_trace = primary.get_trace(primary_block.height());
|
||||
let mut primary_trace = primary.get_trace(primary_block.height());
|
||||
|
||||
let witnesses = join_all(args.witnesses.0.into_iter().map(|addr| {
|
||||
make_provider(
|
||||
|
@ -241,6 +241,9 @@ async fn main() -> Result<()> {
|
|||
.map_err(|e: ProofError| eyre!(e))?;
|
||||
|
||||
if let Some(trace_file) = args.trace_file {
|
||||
let latest_block = primary.fetch_light_block(status.sync_info.latest_block_height)?;
|
||||
primary_trace.push(latest_block);
|
||||
|
||||
let output = ProofOutput {
|
||||
light_client_proof: primary_trace,
|
||||
merkle_proof: proof.into(),
|
||||
|
|
Loading…
Reference in a new issue