Skip to content

Commit

Permalink
chore: simplify test case
Browse files Browse the repository at this point in the history
  • Loading branch information
vgonkivs committed Jan 18, 2024
1 parent f7893d8 commit f2bd92b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions share/eds/byzantine/bad_encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,10 @@ func TestBEFP_Validate(t *testing.T) {
{
name: "incorrect share with Proof",
prepareFn: func() error {
// find first non-nil share to break the proof
for index := 1; index < len(befp.Shares); index++ {
if befp.Shares[index] != nil {
befp.Shares[0] = befp.Shares[index]
break
}
}
// break the first shareWithProof to test negative case
sh := sharetest.RandShares(t, 2)
nmtProof := nmt.NewInclusionProof(0, 1, nil, false)
befp.Shares[0] = &ShareWithProof{sh[0], &nmtProof}
return proof.Validate(&header.ExtendedHeader{DAH: &dah})
},
expectedResult: func(err error) {
Expand Down

0 comments on commit f2bd92b

Please sign in to comment.