[release/1.4.14] core, trie: replace state caches with trie journal
(cherry picked from commit cd791bd855
)
This commit is contained in:
committed by
Péter Szilágyi
parent
7c17a6704c
commit
ddadf402fc
@ -42,7 +42,6 @@ func (odr *testOdr) Retrieve(ctx context.Context, req OdrRequest) error {
|
||||
case *TrieRequest:
|
||||
t, _ := trie.New(req.root, odr.sdb)
|
||||
req.proof = t.Prove(req.key)
|
||||
trie.ClearGlobalCache()
|
||||
case *NodeDataRequest:
|
||||
req.data, _ = odr.sdb.Get(req.hash[:])
|
||||
}
|
||||
@ -75,7 +74,6 @@ func TestLightStateOdr(t *testing.T) {
|
||||
odr := &testOdr{sdb: sdb, ldb: ldb}
|
||||
ls := NewLightState(root, odr)
|
||||
ctx := context.Background()
|
||||
trie.ClearGlobalCache()
|
||||
|
||||
for i := byte(0); i < 100; i++ {
|
||||
addr := common.Address{i}
|
||||
@ -160,7 +158,6 @@ func TestLightStateSetCopy(t *testing.T) {
|
||||
odr := &testOdr{sdb: sdb, ldb: ldb}
|
||||
ls := NewLightState(root, odr)
|
||||
ctx := context.Background()
|
||||
trie.ClearGlobalCache()
|
||||
|
||||
for i := byte(0); i < 100; i++ {
|
||||
addr := common.Address{i}
|
||||
@ -237,7 +234,6 @@ func TestLightStateDelete(t *testing.T) {
|
||||
odr := &testOdr{sdb: sdb, ldb: ldb}
|
||||
ls := NewLightState(root, odr)
|
||||
ctx := context.Background()
|
||||
trie.ClearGlobalCache()
|
||||
|
||||
addr := common.Address{42}
|
||||
|
||||
|
Reference in New Issue
Block a user