unexport mapToScalarFieldBytes

This commit is contained in:
Kevaundray Wedderburn 2024-02-29 12:07:22 +00:00
parent 2f75c12e2e
commit 19c31a0ead

View file

@ -308,14 +308,14 @@ func StorageSlotKeyWithEvaluatedAddress(evaluated *verkle.Point, storageKey []by
// TODO: We can remove this method once https://github.com/ethereum/go-verkle/pull/428 // TODO: We can remove this method once https://github.com/ethereum/go-verkle/pull/428
// TODO is merged. // TODO is merged.
// TODO: we would then be able to call `verkle.MapToScalarFieldBytes` // TODO: we would then be able to call `verkle.MapToScalarFieldBytes`
func MapToScalarFieldBytes(point *verkle.Point) [32]byte { func mapToScalarFieldBytes(point *verkle.Point) [32]byte {
var hashedPoint verkle.Fr var hashedPoint verkle.Fr
point.MapToScalarField(&hashedPoint) point.MapToScalarField(&hashedPoint)
return hashedPoint.BytesLE() return hashedPoint.BytesLE()
} }
func pointToHash(evaluated *verkle.Point, suffix byte) []byte { func pointToHash(evaluated *verkle.Point, suffix byte) []byte {
bytes := MapToScalarFieldBytes(evaluated) bytes := mapToScalarFieldBytes(evaluated)
bytes[31] = suffix bytes[31] = suffix
return bytes[:] return bytes[:]
} }