From b0cb9ed92a70dd05db8e048d28b20f93a8eaa14f Mon Sep 17 00:00:00 2001 From: bendanzhentan <455462586@qq.com> Date: Thu, 14 Mar 2024 12:28:06 +0800 Subject: [PATCH] chore: attach more error info --- core/processor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/processor.go b/core/processor.go index c5c4332..66e72ce 100644 --- a/core/processor.go +++ b/core/processor.go @@ -250,22 +250,22 @@ func (b *Processor) GetProvenTime(wi *WithdrawalInitiatedLog) (*big.Int, error) receipt, err := b.L1Client.TransactionReceipt(context.Background(), common.HexToHash(wi.TransactionHash)) if err != nil { - return nil, err + return nil, fmt.Errorf("TransactionReceipt err: %v, wi: %v", err, wi) } withdrawal, err := b.toWithdrawal(wi, receipt) if err != nil { - return nil, err + return nil, fmt.Errorf("toWithdrawal err: %v, wi: %v", err, wi) } withdrawalHash, err := b.hashWithdrawal(withdrawal) if err != nil { - return nil, err + return nil, fmt.Errorf("hashWithdrawal err: %v, wi: %v", err, wi) } provenWithdrawal, err := optimismPortal.ProvenWithdrawals(nil, common.HexToHash(withdrawalHash)) if err != nil { - return nil, err + return nil, fmt.Errorf("optimismPortal.ProvenWithdrawals err: %v, wi: %v", err, wi) } return provenWithdrawal.Timestamp, nil