Skip to content

Commit 5ccc78a

Browse files
committed
fix: correct ShadowProver constructor param order and handle get_receipt error
- Swap rollup_address and shadow_rollup_address parameters in ShadowProver::new() to match the call site in main.rs - Replace unwrap() on get_receipt() with proper error handling to avoid panics on RPC/network failures
1 parent 2f9c851 commit 5ccc78a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

prover/bin/shadow-prove/src/shadow_prove.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ where
6060
{
6161
pub fn new(
6262
wallet_address: Address,
63-
shadow_rollup_address: Address,
6463
rollup_address: Address,
64+
shadow_rollup_address: Address,
6565
l1_provider: DynProvider,
6666
shadow_provider: DynProvider,
6767
wallet: P,
@@ -226,7 +226,14 @@ where
226226
continue;
227227
}
228228
};
229-
let receipt = pending_tx.get_receipt().await.unwrap();
229+
let receipt = match pending_tx.get_receipt().await {
230+
Ok(r) => r,
231+
Err(e) => {
232+
log::error!("get_receipt error: {:#?}", e);
233+
METRICS.shadow_verify_result.set(2);
234+
continue;
235+
}
236+
};
230237
if receipt.status() {
231238
log::info!("tx of prove_state success, tx hash: {:?}", receipt.transaction_hash());
232239
METRICS.shadow_verify_result.set(1);

0 commit comments

Comments
 (0)