Skip to content

Commit

Permalink
Update share/availability/light/availability.go
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad <13818348+walldiss@users.noreply.github.com>
  • Loading branch information
renaynay and walldiss authored Nov 18, 2024
1 parent 109a3c7 commit 80f6942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/availability/light/availability.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (la *ShareAvailability) SharesAvailable(ctx context.Context, header *header
}
// Verify total samples count.
totalSamples := len(samples.Remaining) + len(samples.Available)
if (totalSamples != int(la.params.SampleAmount)) && (totalSamples != len(dah.RowRoots)*len(dah.RowRoots)) {
if (totalSamples != int(la.params.SampleAmount)) && (la.params.SampleAmount > len(dah.RowRoots)*len(dah.RowRoots)) {

Check failure on line 106 in share/availability/light/availability.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

invalid operation: la.params.SampleAmount > len(dah.RowRoots) * len(dah.RowRoots) (mismatched types uint and int)) (typecheck)

Check failure on line 106 in share/availability/light/availability.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

invalid operation: la.params.SampleAmount > len(dah.RowRoots) * len(dah.RowRoots) (mismatched types uint and int)) (typecheck)

Check failure on line 106 in share/availability/light/availability.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

invalid operation: la.params.SampleAmount > len(dah.RowRoots) * len(dah.RowRoots) (mismatched types uint and int) (typecheck)

Check failure on line 106 in share/availability/light/availability.go

View workflow job for this annotation

GitHub Actions / go-ci / Unit Tests Coverage (ubuntu-latest)

invalid operation: la.params.SampleAmount > len(dah.RowRoots) * len(dah.RowRoots) (mismatched types uint and int)

Check failure on line 106 in share/availability/light/availability.go

View workflow job for this annotation

GitHub Actions / go-ci / Unit Tests Coverage (macos-14)

invalid operation: la.params.SampleAmount > len(dah.RowRoots) * len(dah.RowRoots) (mismatched types uint and int)
return fmt.Errorf("invalid sampling result:"+
" expected %d samples, got %d", la.params.SampleAmount, totalSamples)
}
Expand Down

0 comments on commit 80f6942

Please sign in to comment.