mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
Enable thelper linter (#610)
This commit is contained in:
parent
1508952df9
commit
a9459aea68
@ -8,7 +8,7 @@ linters:
|
||||
- unconvert
|
||||
- predeclared
|
||||
# - wastedassign # go1.18
|
||||
# - thelper
|
||||
- thelper
|
||||
- gofmt
|
||||
- errcheck
|
||||
- gosimple
|
||||
|
@ -28,6 +28,7 @@ import (
|
||||
)
|
||||
|
||||
func assertTwoThreeTree(t *testing.T, tree *Tree23, expectedKeysLevelOrder []Felt) {
|
||||
t.Helper()
|
||||
treeValid, err := tree.IsValid()
|
||||
assert.True(t, treeValid, "2-3-tree properties do not hold for tree: %v, error: %v", tree.KeysInLevelOrder(), err)
|
||||
if expectedKeysLevelOrder != nil {
|
||||
@ -36,6 +37,7 @@ func assertTwoThreeTree(t *testing.T, tree *Tree23, expectedKeysLevelOrder []Fel
|
||||
}
|
||||
|
||||
func require23Tree(t *testing.T, tree *Tree23, expectedKeysLevelOrder []Felt, input1, input2 []byte) {
|
||||
t.Helper()
|
||||
treeValid, err := tree.IsValid()
|
||||
require.True(t, treeValid, "2-3-tree properties do not hold: input [%v %v] [%+q %+q], error: %v",
|
||||
input1, input2, string(input1), string(input2), err)
|
||||
|
@ -27,6 +27,7 @@ import (
|
||||
)
|
||||
|
||||
func BaseCase(t *testing.T) (kv.RwDB, kv.RwTx, kv.RwCursorDupSort) {
|
||||
t.Helper()
|
||||
path := t.TempDir()
|
||||
logger := log.New()
|
||||
table := "Table"
|
||||
@ -53,6 +54,7 @@ func BaseCase(t *testing.T) (kv.RwDB, kv.RwTx, kv.RwCursorDupSort) {
|
||||
}
|
||||
|
||||
func iteration(t *testing.T, c kv.RwCursorDupSort, start []byte, val []byte) ([]string, []string) {
|
||||
t.Helper()
|
||||
var keys []string
|
||||
var values []string
|
||||
var err error
|
||||
@ -553,6 +555,7 @@ func TestDupDelete(t *testing.T) {
|
||||
}
|
||||
|
||||
func baseAutoConversion(t *testing.T) (kv.RwDB, kv.RwTx, kv.RwCursor) {
|
||||
t.Helper()
|
||||
path := t.TempDir()
|
||||
logger := log.New()
|
||||
db := NewMDBX(logger).Path(path).MustOpen()
|
||||
|
Loading…
Reference in New Issue
Block a user