Replace last block in trace with latest block

This commit is contained in:
hu55a1n1 2024-01-04 03:11:53 -08:00
parent 87323daaac
commit 6c70969814

View file

@ -241,7 +241,10 @@ async fn main() -> Result<()> {
.map_err(|e: ProofError| eyre!(e))?; .map_err(|e: ProofError| eyre!(e))?;
if let Some(trace_file) = args.trace_file { 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 latest_block = primary.fetch_light_block(status.sync_info.latest_block_height)?;
let _ = primary_trace.pop();
primary_trace.push(latest_block); primary_trace.push(latest_block);
let output = ProofOutput { let output = ProofOutput {