mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
21 lines
497 B
Go
21 lines
497 B
Go
// (c) 2023-2024, Lux Partners Limited. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package state
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/luxdefi/evm/core/rawdb"
|
|
"github.com/luxdefi/evm/precompile/contract"
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func NewTestStateDB(t testing.TB) contract.StateDB {
|
|
db := rawdb.NewMemoryDatabase()
|
|
stateDB, err := New(common.Hash{}, NewDatabase(db), nil)
|
|
require.NoError(t, err)
|
|
return stateDB
|
|
}
|