From 6c70969814d5c9d779d84df253151fbd0f317f10 Mon Sep 17 00:00:00 2001 From: hu55a1n1 Date: Thu, 4 Jan 2024 03:11:53 -0800 Subject: [PATCH] Replace last block in trace with latest block --- utils/tm-prover/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/tm-prover/src/main.rs b/utils/tm-prover/src/main.rs index 0f7fb07..0012188 100644 --- a/utils/tm-prover/src/main.rs +++ b/utils/tm-prover/src/main.rs @@ -241,7 +241,10 @@ async fn main() -> Result<()> { .map_err(|e: ProofError| eyre!(e))?; if let Some(trace_file) = args.trace_file { + // replace the last block in the trace (i.e. the (latest - 1) block) with the latest block + // we don't actually verify the latest block because it will be verified on the other side let latest_block = primary.fetch_light_block(status.sync_info.latest_block_height)?; + let _ = primary_trace.pop(); primary_trace.push(latest_block); let output = ProofOutput {