core/state: remove toAddr helper in tests #22772 (#1203)

Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com>
This commit is contained in:
Daniel Liu 2025-08-21 13:38:23 +08:00 committed by GitHub
parent da624be994
commit 0c57a6c64c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,8 +28,6 @@ import (
"github.com/XinFinOrg/XDPoSChain/ethdb" "github.com/XinFinOrg/XDPoSChain/ethdb"
) )
var toAddr = common.BytesToAddress
type stateTest struct { type stateTest struct {
db ethdb.Database db ethdb.Database
state *StateDB state *StateDB
@ -107,7 +105,7 @@ func TestNull(t *testing.T) {
} }
func TestSnapshot(t *testing.T) { func TestSnapshot(t *testing.T) {
stateobjaddr := toAddr([]byte("aa")) stateobjaddr := common.BytesToAddress([]byte("aa"))
var storageaddr common.Hash var storageaddr common.Hash
data1 := common.BytesToHash([]byte{42}) data1 := common.BytesToHash([]byte{42})
data2 := common.BytesToHash([]byte{43}) data2 := common.BytesToHash([]byte{43})