Skip to content

Commit

Permalink
remove unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
antonis19 committed Jan 15, 2025
1 parent 9395c45 commit 18ea27e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions erigon-lib/commitment/hex_patricia_hashed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func Test_HexPatriciaHashed_UniqueRepresentation2(t *testing.T) {
}

// Ordering is crucial for trie. since trie do hashing by itself and reorder updates inside Process{Keys,Updates}, have to reorder them for some tests
func sortUpdatesByHashIncrease(t *testing.T, hph *HexPatriciaHashed, plainKeys [][]byte, updates []Update) ([][]byte, []Update) {
func sortUpdatesByHashIncrease(t *testing.T, plainKeys [][]byte, updates []Update) ([][]byte, []Update) {
t.Helper()

ku := make([]*KeyUpdate, len(plainKeys))
Expand Down Expand Up @@ -303,7 +303,7 @@ func Test_HexPatriciaHashed_BrokenUniqueRepr(t *testing.T) {
trieBatch := NewHexPatriciaHashed(keyLen, stateBatch, stateBatch.TempDir())

if sortHashedKeys {
plainKeys, updates = sortUpdatesByHashIncrease(t, trieSequential, plainKeys, updates)
plainKeys, updates = sortUpdatesByHashIncrease(t, plainKeys, updates)
}

trieSequential.SetTrace(trace)
Expand Down Expand Up @@ -387,7 +387,7 @@ func Test_HexPatriciaHashed_UniqueRepresentation(t *testing.T) {
trieBatch := NewHexPatriciaHashed(length.Addr, stateBatch, stateBatch.TempDir())
trieBatch.trace = true

plainKeys, updates = sortUpdatesByHashIncrease(t, trieSequential, plainKeys, updates)
plainKeys, updates = sortUpdatesByHashIncrease(t, plainKeys, updates)

// trieSequential.SetTrace(true)
// trieBatch.SetTrace(true)
Expand Down Expand Up @@ -835,7 +835,7 @@ func Test_HexPatriciaHashed_ProcessUpdates_UniqueRepresentation_AfterStateRestor
trieSequential := NewHexPatriciaHashed(length.Addr, stateSeq, stateSeq.TempDir())
trieBatch := NewHexPatriciaHashed(length.Addr, stateBatch, stateBatch.TempDir())

plainKeys, updates = sortUpdatesByHashIncrease(t, trieSequential, plainKeys, updates)
plainKeys, updates = sortUpdatesByHashIncrease(t, plainKeys, updates)

var rSeq, rBatch []byte
{
Expand Down Expand Up @@ -930,7 +930,7 @@ func Test_HexPatriciaHashed_ProcessUpdates_UniqueRepresentationInTheMiddle(t *te
sequential := NewHexPatriciaHashed(20, stateSeq, stateSeq.TempDir())
batch := NewHexPatriciaHashed(20, stateBatch, stateBatch.TempDir())

plainKeys, updates = sortUpdatesByHashIncrease(t, sequential, plainKeys, updates)
plainKeys, updates = sortUpdatesByHashIncrease(t, plainKeys, updates)

//sequential.SetTrace(true)
//batch.SetTrace(true)
Expand Down Expand Up @@ -1268,7 +1268,7 @@ func Test_HexPatriciaHashed_ProcessWithDozensOfStorageKeys(t *testing.T) {
Build()

trieOne := NewHexPatriciaHashed(length.Addr, msOne, msOne.TempDir())
plainKeys, updates = sortUpdatesByHashIncrease(t, trieOne, plainKeys, updates)
plainKeys, updates = sortUpdatesByHashIncrease(t, plainKeys, updates)

//rnd := rand.New(rand.NewSource(345))
//noise := make([]byte, 32)
Expand Down

0 comments on commit 18ea27e

Please sign in to comment.