Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/base-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub async fn finalized_l2_block_number_of_l1_block_number(
l1_provider,
l1_block_number,
l1_dispute_game_factory_proxy,
count - U256::ONE,
count.saturating_sub(U256::ONE),
)
.await
}
Expand Down
2 changes: 1 addition & 1 deletion lib/bob-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub async fn finalized_l2_block_number_of_l1_block_number(
l1_provider,
l1_block_number,
l1_dispute_game_factory_proxy,
count - U256::ONE,
count.saturating_sub(U256::ONE),
)
.await
}
Expand Down
8 changes: 8 additions & 0 deletions voyager/plugins/client-update/base/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,14 @@ impl Module {
.await
.map_err(|err| ErrorObject::owned(-1, ErrorReporter(err).to_string(), None::<()>))?;

if game_index.is_zero() {
return Err(ErrorObject::owned(
-1,
"no dispute games at this L1 block height".to_string(),
None::<()>,
));
}

let game_index = game_index - U256::ONE;

let dispute_game_factory_account_proof = self
Expand Down
8 changes: 8 additions & 0 deletions voyager/plugins/client-update/bob/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,14 @@ impl Module {
.await
.map_err(|err| ErrorObject::owned(-1, ErrorReporter(err).to_string(), None::<()>))?;

if game_index.is_zero() {
return Err(ErrorObject::owned(
-1,
"no dispute games at this L1 block height".to_string(),
None::<()>,
));
}

let game_index = game_index - U256::ONE;

let dispute_game_factory_account_proof = self
Expand Down