diff --git a/cmd/api/go.mod b/cmd/api/go.mod index 9b1478b..8a41ab9 100644 --- a/cmd/api/go.mod +++ b/cmd/api/go.mod @@ -33,6 +33,7 @@ require ( github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect github.com/lib/pq v1.10.9 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect lukechampine.com/uint128 v1.3.0 // indirect diff --git a/cmd/api/go.sum b/cmd/api/go.sum index da1ddef..db24697 100644 --- a/cmd/api/go.sum +++ b/cmd/api/go.sum @@ -38,6 +38,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= diff --git a/cmd/archivetoarchive/go.mod b/cmd/archivetoarchive/go.mod index b059758..d0fc516 100644 --- a/cmd/archivetoarchive/go.mod +++ b/cmd/archivetoarchive/go.mod @@ -25,6 +25,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect go.etcd.io/bbolt v1.3.7 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect diff --git a/cmd/archivetoarchive/go.sum b/cmd/archivetoarchive/go.sum index 05165df..d3e4b63 100644 --- a/cmd/archivetoarchive/go.sum +++ b/cmd/archivetoarchive/go.sum @@ -34,6 +34,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= diff --git a/cmd/archivetoindex/go.mod b/cmd/archivetoindex/go.mod index 0900dfb..8545dfb 100644 --- a/cmd/archivetoindex/go.mod +++ b/cmd/archivetoindex/go.mod @@ -32,6 +32,7 @@ require ( github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect github.com/lib/pq v1.10.9 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect go.etcd.io/bbolt v1.3.7 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect diff --git a/cmd/archivetoindex/go.sum b/cmd/archivetoindex/go.sum index 2d11359..1782adc 100644 --- a/cmd/archivetoindex/go.sum +++ b/cmd/archivetoindex/go.sum @@ -36,6 +36,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= diff --git a/cmd/cachetoarchive/go.mod b/cmd/cachetoarchive/go.mod index 713fb08..a6897bd 100644 --- a/cmd/cachetoarchive/go.mod +++ b/cmd/cachetoarchive/go.mod @@ -25,6 +25,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect go.etcd.io/bbolt v1.3.7 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect diff --git a/cmd/cachetoarchive/go.sum b/cmd/cachetoarchive/go.sum index 05165df..d3e4b63 100644 --- a/cmd/cachetoarchive/go.sum +++ b/cmd/cachetoarchive/go.sum @@ -34,6 +34,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= diff --git a/cmd/daemon/go.mod b/cmd/daemon/go.mod index 6f365c8..32b5be7 100644 --- a/cmd/daemon/go.mod +++ b/cmd/daemon/go.mod @@ -31,6 +31,7 @@ require ( github.com/jxskiss/base62 v1.1.0 // indirect github.com/klauspost/compress v1.16.7 // indirect github.com/lib/pq v1.10.9 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect diff --git a/cmd/daemon/go.sum b/cmd/daemon/go.sum index 5da4b8a..4194d07 100644 --- a/cmd/daemon/go.sum +++ b/cmd/daemon/go.sum @@ -79,6 +79,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= diff --git a/cmd/httputils/go.mod b/cmd/httputils/go.mod index 229132b..8f5e266 100644 --- a/cmd/httputils/go.mod +++ b/cmd/httputils/go.mod @@ -11,5 +11,6 @@ require ( github.com/floatdrop/lru v1.3.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect golang.org/x/sys v0.10.0 // indirect ) diff --git a/cmd/httputils/go.sum b/cmd/httputils/go.sum index 948d4b8..1e7fc63 100644 --- a/cmd/httputils/go.sum +++ b/cmd/httputils/go.sum @@ -6,5 +6,7 @@ github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/jxskiss/base62 v1.1.0 h1:A5zbF8v8WXx2xixnAKD2w+abC+sIzYJX+nxmhA6HWFw= github.com/jxskiss/base62 v1.1.0/go.mod h1:HhWAlUXvxKThfOlZbcuFzsqwtF5TcqS9ru3y5GfjWAc= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/cmd/index/go.mod b/cmd/index/go.mod index 045529e..b7cd189 100644 --- a/cmd/index/go.mod +++ b/cmd/index/go.mod @@ -23,6 +23,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect lukechampine.com/uint128 v1.3.0 // indirect diff --git a/cmd/index/go.sum b/cmd/index/go.sum index 1f8410b..c24e630 100644 --- a/cmd/index/go.sum +++ b/cmd/index/go.sum @@ -36,6 +36,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= diff --git a/cmd/legacytoarchive/go.mod b/cmd/legacytoarchive/go.mod index 503703b..d54189d 100644 --- a/cmd/legacytoarchive/go.mod +++ b/cmd/legacytoarchive/go.mod @@ -25,6 +25,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect go.etcd.io/bbolt v1.3.7 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect diff --git a/cmd/legacytoarchive/go.sum b/cmd/legacytoarchive/go.sum index 05165df..d3e4b63 100644 --- a/cmd/legacytoarchive/go.sum +++ b/cmd/legacytoarchive/go.sum @@ -34,6 +34,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= diff --git a/cmd/p2pool/go.mod b/cmd/p2pool/go.mod index 6ea0a47..5c32e41 100644 --- a/cmd/p2pool/go.mod +++ b/cmd/p2pool/go.mod @@ -31,6 +31,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect go.etcd.io/bbolt v1.3.7 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sync v0.3.0 // indirect diff --git a/cmd/p2pool/go.sum b/cmd/p2pool/go.sum index f2d66c7..ca200c6 100644 --- a/cmd/p2pool/go.sum +++ b/cmd/p2pool/go.sum @@ -40,6 +40,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= diff --git a/cmd/readcache/go.mod b/cmd/readcache/go.mod index 69f9c78..4f46437 100644 --- a/cmd/readcache/go.mod +++ b/cmd/readcache/go.mod @@ -25,6 +25,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect lukechampine.com/uint128 v1.3.0 // indirect diff --git a/cmd/readcache/go.sum b/cmd/readcache/go.sum index 4b36dfb..b9403ce 100644 --- a/cmd/readcache/go.sum +++ b/cmd/readcache/go.sum @@ -34,6 +34,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= diff --git a/cmd/recoverpoolblock/go.mod b/cmd/recoverpoolblock/go.mod index d67b9d9..057e1ec 100644 --- a/cmd/recoverpoolblock/go.mod +++ b/cmd/recoverpoolblock/go.mod @@ -25,6 +25,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect go.etcd.io/bbolt v1.3.7 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect diff --git a/cmd/recoverpoolblock/go.sum b/cmd/recoverpoolblock/go.sum index 05165df..d3e4b63 100644 --- a/cmd/recoverpoolblock/go.sum +++ b/cmd/recoverpoolblock/go.sum @@ -34,6 +34,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= diff --git a/cmd/scansweeps/go.mod b/cmd/scansweeps/go.mod index ca9bc28..bfb1a92 100644 --- a/cmd/scansweeps/go.mod +++ b/cmd/scansweeps/go.mod @@ -29,6 +29,7 @@ require ( github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect github.com/lib/pq v1.10.9 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect lukechampine.com/uint128 v1.3.0 // indirect diff --git a/cmd/scansweeps/go.sum b/cmd/scansweeps/go.sum index 1f8410b..c24e630 100644 --- a/cmd/scansweeps/go.sum +++ b/cmd/scansweeps/go.sum @@ -36,6 +36,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= diff --git a/cmd/utils/go.mod b/cmd/utils/go.mod index 2376e07..4e7ade0 100644 --- a/cmd/utils/go.mod +++ b/cmd/utils/go.mod @@ -26,6 +26,7 @@ require ( github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect github.com/lib/pq v1.10.9 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect lukechampine.com/uint128 v1.3.0 // indirect diff --git a/cmd/utils/go.sum b/cmd/utils/go.sum index 1f8410b..c24e630 100644 --- a/cmd/utils/go.sum +++ b/cmd/utils/go.sum @@ -36,6 +36,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= diff --git a/cmd/web/go.mod b/cmd/web/go.mod index c49d3a0..71b143f 100644 --- a/cmd/web/go.mod +++ b/cmd/web/go.mod @@ -13,6 +13,7 @@ require ( git.gammaspectra.live/P2Pool/p2pool-observer/cmd/index v0.0.0 git.gammaspectra.live/P2Pool/p2pool-observer/cmd/utils v0.0.0 github.com/gorilla/mux v1.8.0 + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc github.com/valyala/quicktemplate v1.7.0 ) diff --git a/cmd/web/go.sum b/cmd/web/go.sum index 15d1b43..6c4e35e 100644 --- a/cmd/web/go.sum +++ b/cmd/web/go.sum @@ -43,6 +43,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= diff --git a/cmd/web/views/funcs.qtpl b/cmd/web/views/funcs.qtpl index e3d1e2c..fdcc89b 100644 --- a/cmd/web/views/funcs.qtpl +++ b/cmd/web/views/funcs.qtpl @@ -9,6 +9,7 @@ {% import "fmt" %} {% import "slices" %} {% import hex2 "encoding/hex" %} +{% import fasthex "github.com/tmthrgd/go-hex" %} {% stripspace %} @@ -20,32 +21,32 @@ {%s s %} {% case types.Difficulty %} {% code - hex2.Encode(ctx.HexBuffer[:types.DifficultySize*2], s.Bytes()) + fasthex.Encode(ctx.HexBuffer[:types.DifficultySize*2], s.Bytes()) %} {%z= ctx.HexBuffer[:types.DifficultySize*2] %} {% case crypto.PrivateKeyBytes %} {% code - hex2.Encode(ctx.HexBuffer[:], s[:]) + fasthex.Encode(ctx.HexBuffer[:], s[:]) %} {%z= ctx.HexBuffer[:] %} {% case crypto.PublicKeyBytes %} {% code - hex2.Encode(ctx.HexBuffer[:], s[:]) + fasthex.Encode(ctx.HexBuffer[:], s[:]) %} {%z= ctx.HexBuffer[:] %} {% case crypto.PrivateKey %} {% code - hex2.Encode(ctx.HexBuffer[:], s.AsSlice()) + fasthex.Encode(ctx.HexBuffer[:], s.AsSlice()) %} {%z= ctx.HexBuffer[:] %} {% case crypto.PublicKey %} {% code - hex2.Encode(ctx.HexBuffer[:], s.AsSlice()) + fasthex.Encode(ctx.HexBuffer[:], s.AsSlice()) %} {%z= ctx.HexBuffer[:] %} {% case types.Hash %} {% code - hex2.Encode(ctx.HexBuffer[:], s[:]) + fasthex.Encode(ctx.HexBuffer[:], s[:]) %} {%z= ctx.HexBuffer[:] %} {% case []byte %} @@ -54,14 +55,14 @@ {% code var buf [4]byte binary.LittleEndian.PutUint32(buf[:], s) - hex2.Encode(ctx.HexBuffer[:4*2], buf[:]) + fasthex.Encode(ctx.HexBuffer[:4*2], buf[:]) %} {%z= ctx.HexBuffer[:4*2] %} {% case uint64 %} {% code var buf [8]byte binary.LittleEndian.PutUint64(buf[:], s) - hex2.Encode(ctx.HexBuffer[:8*2], buf[:]) + fasthex.Encode(ctx.HexBuffer[:8*2], buf[:]) %} {%z= ctx.HexBuffer[:8*2] %} {% default %} @@ -77,27 +78,27 @@ {%z= utils.ShortenSlice(slices.Clone(s), n) %} {% case crypto.PrivateKeyBytes %} {% code - hex2.Encode(ctx.HexBuffer[:], s[:]) + fasthex.Encode(ctx.HexBuffer[:], s[:]) %} {%z= utils.ShortenSlice(ctx.HexBuffer[:], n) %} {% case crypto.PublicKeyBytes %} {% code - hex2.Encode(ctx.HexBuffer[:], s[:]) + fasthex.Encode(ctx.HexBuffer[:], s[:]) %} {%z= utils.ShortenSlice(ctx.HexBuffer[:], n) %} {% case crypto.PrivateKey %} {% code - hex2.Encode(ctx.HexBuffer[:], s.AsSlice()) + fasthex.Encode(ctx.HexBuffer[:], s.AsSlice()) %} {%z= utils.ShortenSlice(ctx.HexBuffer[:], n) %} {% case crypto.PublicKey %} {% code - hex2.Encode(ctx.HexBuffer[:], s.AsSlice()) + fasthex.Encode(ctx.HexBuffer[:], s.AsSlice()) %} {%z= utils.ShortenSlice(ctx.HexBuffer[:], n) %} {% case types.Hash %} {% code - hex2.Encode(ctx.HexBuffer[:], s[:]) + fasthex.Encode(ctx.HexBuffer[:], s[:]) %} {%z= utils.ShortenSlice(ctx.HexBuffer[:], n) %} {% case fmt.Stringer %} diff --git a/go.mod b/go.mod index b3b43ee..a32948b 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/holiman/uint256 v1.2.3 github.com/jxskiss/base62 v1.1.0 github.com/stretchr/testify v1.8.1 + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc golang.org/x/sys v0.10.0 lukechampine.com/uint128 v1.3.0 ) diff --git a/go.sum b/go.sum index b4a2f0f..7828fa3 100644 --- a/go.sum +++ b/go.sum @@ -48,6 +48,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= diff --git a/monero/crypto/private.go b/monero/crypto/private.go index a8fe340..e6ca2d2 100644 --- a/monero/crypto/private.go +++ b/monero/crypto/private.go @@ -7,6 +7,7 @@ import ( "errors" "git.gammaspectra.live/P2Pool/edwards25519" "git.gammaspectra.live/P2Pool/p2pool-observer/utils" + fasthex "github.com/tmthrgd/go-hex" ) type PrivateKey interface { @@ -160,7 +161,7 @@ func (k *PrivateKeyBytes) UnmarshalJSON(b []byte) error { return errors.New("wrong key size") } - if _, err := hex.Decode(k[:], b[1:len(b)-1]); err != nil { + if _, err := fasthex.Decode(k[:], b[1:len(b)-1]); err != nil { return err } else { return nil @@ -171,7 +172,7 @@ func (k *PrivateKeyBytes) MarshalJSON() ([]byte, error) { var buf [PrivateKeySize*2 + 2]byte buf[0] = '"' buf[PrivateKeySize*2+1] = '"' - hex.Encode(buf[1:], k[:]) + fasthex.Encode(buf[1:], k[:]) return buf[:], nil } @@ -254,7 +255,7 @@ func (k *PrivateKeySlice) MarshalJSON() ([]byte, error) { var buf [PrivateKeySize*2 + 2]byte buf[0] = '"' buf[PrivateKeySize*2+1] = '"' - hex.Encode(buf[1:], (*k)[:]) + fasthex.Encode(buf[1:], (*k)[:]) return buf[:], nil } diff --git a/monero/crypto/public.go b/monero/crypto/public.go index ed938ab..d4f972d 100644 --- a/monero/crypto/public.go +++ b/monero/crypto/public.go @@ -7,6 +7,7 @@ import ( "errors" "git.gammaspectra.live/P2Pool/edwards25519" "git.gammaspectra.live/P2Pool/p2pool-observer/utils" + fasthex "github.com/tmthrgd/go-hex" ) type PublicKey interface { @@ -143,7 +144,7 @@ func (k *PublicKeyBytes) UnmarshalJSON(b []byte) error { return errors.New("wrong key size") } - if _, err := hex.Decode(k[:], b[1:len(b)-1]); err != nil { + if _, err := fasthex.Decode(k[:], b[1:len(b)-1]); err != nil { return err } else { return nil @@ -154,7 +155,7 @@ func (k *PublicKeyBytes) MarshalJSON() ([]byte, error) { var buf [PublicKeySize*2 + 2]byte buf[0] = '"' buf[PublicKeySize*2+1] = '"' - hex.Encode(buf[1:], k[:]) + fasthex.Encode(buf[1:], k[:]) return buf[:], nil } @@ -224,6 +225,6 @@ func (k *PublicKeySlice) MarshalJSON() ([]byte, error) { var buf [PublicKeySize*2 + 2]byte buf[0] = '"' buf[PublicKeySize*2+1] = '"' - hex.Encode(buf[1:], (*k)[:]) + fasthex.Encode(buf[1:], (*k)[:]) return buf[:], nil } diff --git a/p2pool/cache/go.mod b/p2pool/cache/go.mod index 6ed6231..7d9644f 100644 --- a/p2pool/cache/go.mod +++ b/p2pool/cache/go.mod @@ -23,6 +23,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/jxskiss/base62 v1.1.0 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/sys v0.10.0 // indirect lukechampine.com/uint128 v1.3.0 // indirect diff --git a/p2pool/cache/go.sum b/p2pool/cache/go.sum index 05165df..d3e4b63 100644 --- a/p2pool/cache/go.sum +++ b/p2pool/cache/go.sum @@ -34,6 +34,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777 h1:5u+6YWU2faS+Sr/x8j9yalMpSDUkatNOZWXV3wMUCGQ= github.com/thepudds/swisstable v0.0.0-20221011152303-9c77dc657777/go.mod h1:4af3KxEsswy6aTzsTcwa8QZUSh4V+80oHdp1QX9uJHA= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= diff --git a/types/difficulty.go b/types/difficulty.go index cbe05ed..32859f4 100644 --- a/types/difficulty.go +++ b/types/difficulty.go @@ -7,6 +7,7 @@ import ( "errors" "git.gammaspectra.live/P2Pool/p2pool-observer/utils" "github.com/holiman/uint256" + fasthex "github.com/tmthrgd/go-hex" "lukechampine.com/uint128" "math" "math/big" @@ -194,7 +195,7 @@ func (d Difficulty) MarshalJSON() ([]byte, error) { var buf [DifficultySize*2 + 2]byte buf[0] = '"' buf[DifficultySize*2+1] = '"' - hex.Encode(buf[1:], encodeBuf[:]) + fasthex.Encode(buf[1:], encodeBuf[:]) return buf[:], nil } @@ -250,7 +251,7 @@ func (d *Difficulty) UnmarshalJSON(b []byte) error { if len(b) == DifficultySize*2+2 { // fast path var buf [DifficultySize]byte - if _, err := hex.Decode(buf[:], b[1:len(b)-1]); err != nil { + if _, err := fasthex.Decode(buf[:], b[1:len(b)-1]); err != nil { return err } else { *d = DifficultyFromBytes(buf[:]) diff --git a/types/types.go b/types/types.go index ca1be43..a440ffc 100644 --- a/types/types.go +++ b/types/types.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "encoding/hex" "errors" + fasthex "github.com/tmthrgd/go-hex" "runtime" "unsafe" ) @@ -19,7 +20,7 @@ func (h Hash) MarshalJSON() ([]byte, error) { var buf [HashSize*2 + 2]byte buf[0] = '"' buf[HashSize*2+1] = '"' - hex.Encode(buf[1:], h[:]) + fasthex.Encode(buf[1:], h[:]) return buf[:], nil } @@ -132,7 +133,7 @@ func (h *Hash) UnmarshalJSON(b []byte) error { return errors.New("wrong hash size") } - if _, err := hex.Decode(h[:], b[1:len(b)-1]); err != nil { + if _, err := fasthex.Decode(h[:], b[1:len(b)-1]); err != nil { return err } else { return nil @@ -145,7 +146,7 @@ func (b Bytes) MarshalJSON() ([]byte, error) { buf := make([]byte, len(b)*2+2) buf[0] = '"' buf[len(buf)-1] = '"' - hex.Encode(buf[1:], b) + fasthex.Encode(buf[1:], b) return buf, nil } @@ -160,7 +161,7 @@ func (b *Bytes) UnmarshalJSON(buf []byte) error { *b = make(Bytes, (len(buf)-2)/2) - if _, err := hex.Decode(*b, buf[1:len(buf)-1]); err != nil { + if _, err := fasthex.Decode(*b, buf[1:len(buf)-1]); err != nil { return err } else { return nil diff --git a/utils/number.go b/utils/number.go index 2174bfe..01b5cc1 100644 --- a/utils/number.go +++ b/utils/number.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "encoding/hex" "github.com/jxskiss/base62" + fasthex "github.com/tmthrgd/go-hex" "math/bits" "strconv" "strings" @@ -64,7 +65,7 @@ func EncodeSliceBinaryNumber(dst, src []byte) []byte { } if len(v) >= (len(src) * 2) { - hex.Encode(dst, src) + fasthex.Encode(dst, src) return dst[:len(src)*2] }