Skip to content

Commit

Permalink
check for nil sequences in getAccInputHash (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Staykov authored Sep 25, 2024
1 parent 8381066 commit d5d1d43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/rpcdaemon/commands/zkevm_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,10 @@ func (api *ZkEvmAPIImpl) getAccInputHash(ctx context.Context, db SequenceReader,
return nil, fmt.Errorf("failed to get sequence range data for batch %d: %w", batchNum, err)
}

if prevSequence == nil || batchSequence == nil {
return nil, fmt.Errorf("failed to get sequence data for batch %d", batchNum)
}

// get batch range for sequence
prevSequenceBatch, currentSequenceBatch := prevSequence.BatchNo, batchSequence.BatchNo
// get call data for tx
Expand Down

0 comments on commit d5d1d43

Please sign in to comment.