Skip to content

Commit

Permalink
chore: attach more error info
Browse files Browse the repository at this point in the history
  • Loading branch information
bendanzhentan committed Mar 14, 2024
1 parent 85bed6b commit b0cb9ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0cb9ed

Please sign in to comment.