Skip to content

Commit

Permalink
proof: check poas slice usage exhaustion (#410)
Browse files Browse the repository at this point in the history
Signed-off-by: Ignacio Hagopian <[email protected]>
  • Loading branch information
jsign authored Oct 27, 2023
1 parent 87337dd commit a90669c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proof_ipa.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ func PreStateTreeFromProof(proof *Proof, rootC *Point) (VerkleNode, error) { //
}
}

if len(poas) != 0 {
return nil, fmt.Errorf("not all proof of absence stems were used: %d", len(poas))
}

root := NewStatelessInternal(0, rootC).(*InternalNode)
comms := proof.Cs
for _, p := range paths {
Expand Down

0 comments on commit a90669c

Please sign in to comment.