We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 492bd3c commit 754fba6Copy full SHA for 754fba6
go/ops.go
@@ -81,7 +81,8 @@ func (op *InnerOp) CheckAgainstSpec(spec *ProofSpec) error {
81
if len(op.Prefix) < int(spec.InnerSpec.MinPrefixLength) {
82
return errors.Errorf("InnerOp prefix too short (%d)", len(op.Prefix))
83
}
84
- if len(op.Prefix) > int(spec.InnerSpec.MaxPrefixLength) {
+ maxLeftChildBytes := (len(spec.InnerSpec.ChildOrder) - 1) * int(spec.InnerSpec.ChildSize)
85
+ if len(op.Prefix) > int(spec.InnerSpec.MaxPrefixLength)+maxLeftChildBytes {
86
return errors.Errorf("InnerOp prefix too long (%d)", len(op.Prefix))
87
88
return nil
0 commit comments