@@ -1154,14 +1154,14 @@ func (leaf *LeafNode) Commit() *Point {
1154
1154
frPool .Put (c1polyp )
1155
1155
}()
1156
1156
1157
- count = fillSuffixTreePoly (c1poly [:] , leaf .values [:128 ])
1158
- leaf .c1 = cfg .CommitToPoly (c1poly [:] , 256 - count )
1157
+ count = fillSuffixTreePoly (c1poly , leaf .values [:128 ])
1158
+ leaf .c1 = cfg .CommitToPoly (c1poly , 256 - count )
1159
1159
1160
1160
for i := 0 ; i < 256 ; i ++ {
1161
1161
c1poly [i ] = Fr {}
1162
1162
}
1163
- count = fillSuffixTreePoly (c1poly [:] , leaf .values [128 :])
1164
- leaf .c2 = cfg .CommitToPoly (c1poly [:] , 256 - count )
1163
+ count = fillSuffixTreePoly (c1poly , leaf .values [128 :])
1164
+ leaf .c2 = cfg .CommitToPoly (c1poly , 256 - count )
1165
1165
1166
1166
for i := 0 ; i < 256 ; i ++ {
1167
1167
c1poly [i ] = Fr {}
@@ -1170,7 +1170,7 @@ func (leaf *LeafNode) Commit() *Point {
1170
1170
StemFromBytes (& c1poly [1 ], leaf .stem )
1171
1171
1172
1172
toFrMultiple ([]* Fr {& c1poly [2 ], & c1poly [3 ]}, []* Point {leaf .c1 , leaf .c2 })
1173
- leaf .commitment = cfg .CommitToPoly (c1poly [:] , 252 )
1173
+ leaf .commitment = cfg .CommitToPoly (c1poly , 252 )
1174
1174
1175
1175
} else if len (leaf .cow ) != 0 {
1176
1176
// If we've already have a calculated commitment, and there're touched leaf values, we do a diff update.
@@ -1180,14 +1180,14 @@ func (leaf *LeafNode) Commit() *Point {
1180
1180
if ! bytes .Equal (oldValue , leaf .values [i ]) {
1181
1181
if i < 128 {
1182
1182
if c1 == nil {
1183
- c1 , old1 = leaf .getOldCn (byte ( i ) )
1183
+ c1 , old1 = leaf .getOldCn (i )
1184
1184
}
1185
- leaf .updateCn (byte ( i ) , oldValue , c1 )
1185
+ leaf .updateCn (i , oldValue , c1 )
1186
1186
} else {
1187
1187
if c2 == nil {
1188
- c2 , old2 = leaf .getOldCn (byte ( i ) )
1188
+ c2 , old2 = leaf .getOldCn (i )
1189
1189
}
1190
- leaf .updateCn (byte ( i ) , oldValue , c2 )
1190
+ leaf .updateCn (i , oldValue , c2 )
1191
1191
}
1192
1192
}
1193
1193
}
0 commit comments