mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
trie: rebase
This commit is contained in:
parent
d273d817cb
commit
94a0320741
1 changed files with 1 additions and 10 deletions
|
|
@ -18,7 +18,6 @@ package trie
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"maps"
|
"maps"
|
||||||
"slices"
|
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -147,18 +146,10 @@ func (t *prevalueTracer) hasList(list [][]byte) []bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
// values returns a list of values of the cached trie nodes.
|
// values returns a list of values of the cached trie nodes.
|
||||||
func (t *prevalueTracer) values() [][]byte {
|
func (t *prevalueTracer) values() map[string][]byte {
|
||||||
t.lock.RLock()
|
t.lock.RLock()
|
||||||
defer t.lock.RUnlock()
|
defer t.lock.RUnlock()
|
||||||
|
|
||||||
return slices.Collect(maps.Values(t.data))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (t *prevalueTracer) keys() []string {
|
|
||||||
return slices.Collect(maps.Keys(t.data))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (t *prevalueTracer) getMap() map[string][]byte {
|
|
||||||
return maps.Clone(t.data)
|
return maps.Clone(t.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue