1 parent bc0d1d5 commit 85206caCopy full SHA for 85206ca
1 file changed
proof/proof.go
@@ -236,8 +236,8 @@ func isSubtreeValid(start, end uint64) error {
236
// special-case large subtree to avoid panic
237
return fmt.Errorf("start %d must be 0 when subtree length %d > 1<<63. ", start, l)
238
}
239
- if start%bitCeil(l) != 0 {
240
- return fmt.Errorf("start %d not a multiple of bit_ceil(end - start) = %d", start, l)
+ if bc := bitCeil(l); start%bc != 0 {
+ return fmt.Errorf("start %d not a multiple of bit_ceil(end - start) = %d", start, bc)
241
242
return nil
243
0 commit comments