Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Nov 28, 2024
1 parent 65bb702 commit 5abca7a
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions programs/range/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fn main() {
// L2 block.
let target = boot.claimed_l2_block_number;

let res = advance_to_target(
let (number, output_root) = advance_to_target(
&mut pipeline,
&executor,
&mut cursor,
Expand All @@ -180,15 +180,8 @@ fn main() {
target,
&cfg,
)
.await;

if let Err(e) = res {
error!(target: "client", "Failed to advance to target L2 block: {:?}", e);
panic!("Failed to advance to target L2 block");
}
let (number, output_root) = res.unwrap();
info!(target: "client", "Advanced to target block number: {}", number);
info!(target: "client", "Claimed L2 block number: {}", boot.claimed_l2_block_number);
.await
.expect("Failed to advance to target L2 block");

////////////////////////////////////////////////////////////////
// EPILOGUE //
Expand All @@ -201,7 +194,7 @@ fn main() {
number = number,
output_root = output_root
);
panic!("Failed to validate L2 block");
panic!("Failed to validate L2 block #{number} with output root {output_root}");
}

info!(
Expand All @@ -210,7 +203,6 @@ fn main() {
number = number,
output_root = output_root
);
println!("Validated derivation and STF. Output Root: {}", output_root);
});
}

Expand Down

0 comments on commit 5abca7a

Please sign in to comment.