Skip to content

Commit

Permalink
chore: check storage proof size
Browse files Browse the repository at this point in the history
  • Loading branch information
bendanzhentan committed Dec 6, 2023
1 parent 12808a0 commit 7675594
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ func (b *Processor) ProveWithdrawalTransaction(ctx context.Context, botDelegated
return fmt.Errorf("get output proposal block error: %v", err)
}

if len(accountResult.StorageProof) == 0 {
return fmt.Errorf("no storage proof")
}

withdrawalProof := accountResult.StorageProof[0]
withdrawalProof2Bytes := make([][]byte, 0)
for _, p1 := range withdrawalProof.Proof {
Expand Down

0 comments on commit 7675594

Please sign in to comment.