You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we see that an outside modulus is being used. Let's bullet proof by firstly checking if the denominator is zero and about a runtime panic of divide by zero
The text was updated successfully, but these errors were encountered:
// RoundUpByMultipleOf rounds cursor up to the next multiple of v. If cursor is divisible// by v, then it returns cursor.funcRoundUpByMultipleOf(cursor, vint) (int, error) {
ifv==0 {
return0, fmt.Errorf("v cannot be 0")
}
ifcursor%v==0 {
returncursor, nil
}
return ((cursor/v) +1) *v, nil
}
If we examine
go-square/inclusion/blob_share_commitment_rules.go
Lines 44 to 47 in 4e84d80
The text was updated successfully, but these errors were encountered: