Update dependencies
This commit is contained in:
parent
84b8b99040
commit
dd8a3b4211
4
go.mod
4
go.mod
|
@ -20,9 +20,9 @@ require (
|
|||
github.com/tyler-sommer/stick v1.0.4
|
||||
go.etcd.io/bbolt v1.3.7
|
||||
golang.org/x/crypto v0.7.0
|
||||
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0
|
||||
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0
|
||||
golang.org/x/net v0.8.0
|
||||
lukechampine.com/uint128 v1.2.0
|
||||
lukechampine.com/uint128 v1.3.0
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
8
go.sum
8
go.sum
|
@ -62,8 +62,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
|
||||
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
|
||||
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 h1:LGJsf5LRplCck6jUCH3dBL2dmycNruWNF5xugkSlfXw=
|
||||
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 h1:pVgRXcIictcr+lBQIFeiwuwtDIs4eL21OuM9nyAADmo=
|
||||
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
|
@ -112,5 +112,5 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
|
|||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
|
||||
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||
lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo=
|
||||
lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||
|
|
|
@ -181,6 +181,10 @@ func (d Difficulty) PutBytes(b []byte) {
|
|||
uint128.Uint128(d).PutBytes(b)
|
||||
}
|
||||
|
||||
func (d Difficulty) PutBytesBE(b []byte) {
|
||||
uint128.Uint128(d).PutBytesBE(b)
|
||||
}
|
||||
|
||||
// Big returns u as a *big.Int.
|
||||
func (d Difficulty) Big() *big.Int {
|
||||
return uint128.Uint128(d).Big()
|
||||
|
@ -214,7 +218,7 @@ func DifficultyFromString(s string) (Difficulty, error) {
|
|||
}
|
||||
|
||||
func DifficultyFromBytes(buf []byte) Difficulty {
|
||||
return Difficulty(uint128.FromBytes(buf).ReverseBytes())
|
||||
return Difficulty(uint128.FromBytesBE(buf))
|
||||
}
|
||||
|
||||
func NewDifficulty(lo, hi uint64) Difficulty {
|
||||
|
@ -242,7 +246,7 @@ func (d *Difficulty) UnmarshalJSON(b []byte) error {
|
|||
|
||||
func (d Difficulty) Bytes() []byte {
|
||||
buf := make([]byte, DifficultySize)
|
||||
d.ReverseBytes().PutBytes(buf)
|
||||
d.PutBytesBE(buf)
|
||||
return buf
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue