fix testcase

This commit is contained in:
allen 2025-09-19 21:55:05 -04:00 committed by Frederick Lyu
parent 4b73f9e293
commit 277c2e5620

View file

@ -26,6 +26,7 @@ import (
"github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/triedb" "github.com/ethereum/go-ethereum/triedb"
) )
@ -164,6 +165,8 @@ func TestStateOverrideTransientStorage(t *testing.T) {
t.Fatalf("failed to apply override: %v", err) t.Fatalf("failed to apply override: %v", err)
} }
statedb.Prepare(params.Rules{}, common.Address{}, common.Address{}, nil, nil, nil)
// Verify transient storage was set // Verify transient storage was set
if got := statedb.GetTransientState(addr, key1); got != value1 { if got := statedb.GetTransientState(addr, key1); got != value1 {
t.Errorf("expected transient state for key1 to be %s, got %s", value1.Hex(), got.Hex()) t.Errorf("expected transient state for key1 to be %s, got %s", value1.Hex(), got.Hex())