From 6092a119db31c6d1b90d9736cc62d0de2346493c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 9 Jul 2024 00:29:50 +0300 Subject: [PATCH] go.mod: update uint256, fix breakage --- encoder.go | 4 ++-- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/encoder.go b/encoder.go index 2036fcd..5db55c1 100644 --- a/encoder.go +++ b/encoder.go @@ -111,14 +111,14 @@ func EncodeUint256(enc *Encoder, n *uint256.Int) { return } if n != nil { - n.MarshalSSZTo(enc.buf[:32]) + n.MarshalSSZInto(enc.buf[:32]) _, enc.err = enc.outWriter.Write(enc.buf[:32]) } else { _, enc.err = enc.outWriter.Write([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}) } } else { if n != nil { - n.MarshalSSZTo(enc.outBuffer) + n.MarshalSSZInto(enc.outBuffer) } else { copy(enc.outBuffer, []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}) } diff --git a/go.mod b/go.mod index 90eaa11..d4b15f6 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/golang/snappy v0.0.4 - github.com/holiman/uint256 v1.2.4 + github.com/holiman/uint256 v1.3.0 golang.org/x/tools v0.22.0 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/go.sum b/go.sum index 2ae7bec..4e76298 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/holiman/uint256 v1.3.0 h1:4wdcm/tnd0xXdu7iS3ruNvxkWwrb4aeBQv19ayYn8F4= +github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=