mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 20:11:21 +00:00
fix lint
This commit is contained in:
parent
23287371e7
commit
03144279ef
@ -7,7 +7,6 @@ import (
|
|||||||
"testing/fstest"
|
"testing/fstest"
|
||||||
|
|
||||||
"github.com/holiman/uint256"
|
"github.com/holiman/uint256"
|
||||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
|
||||||
"github.com/ledgerwatch/erigon-lib/compress"
|
"github.com/ledgerwatch/erigon-lib/compress"
|
||||||
"github.com/ledgerwatch/erigon-lib/downloader/snaptype"
|
"github.com/ledgerwatch/erigon-lib/downloader/snaptype"
|
||||||
"github.com/ledgerwatch/erigon-lib/recsplit"
|
"github.com/ledgerwatch/erigon-lib/recsplit"
|
||||||
@ -239,25 +238,3 @@ func TestParseCompressedFileName(t *testing.T) {
|
|||||||
require.Equal(1_000, int(f.From))
|
require.Equal(1_000, int(f.From))
|
||||||
require.Equal(2_000, int(f.To))
|
require.Equal(2_000, int(f.To))
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkName(b *testing.B) {
|
|
||||||
a := libcommon.Address{}
|
|
||||||
c := a[:]
|
|
||||||
var x libcommon.Address
|
|
||||||
b.Run("a1", func(b *testing.B) {
|
|
||||||
for i := 0; i < b.N; i++ {
|
|
||||||
x = libcommon.BytesToAddress(c)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
b.Run("a2", func(b *testing.B) {
|
|
||||||
for i := 0; i < b.N; i++ {
|
|
||||||
x = libcommon.BytesToAddressNoCopy(c)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
b.Run("a3", func(b *testing.B) {
|
|
||||||
for i := 0; i < b.N; i++ {
|
|
||||||
x = *(*libcommon.Address)(c)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
_ = x
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user