2023-09-06 12:53:36 +00:00
|
|
|
//go:build plugeth
|
|
|
|
|
|
|
|
package statediff
|
|
|
|
|
|
|
|
import (
|
2024-04-12 10:16:04 +00:00
|
|
|
"github.com/ethereum/go-ethereum/core"
|
2023-09-06 12:53:36 +00:00
|
|
|
"github.com/ethereum/go-ethereum/core/state"
|
2024-07-09 11:20:14 +00:00
|
|
|
"github.com/ethereum/go-ethereum/core/types"
|
2024-04-12 10:16:04 +00:00
|
|
|
"github.com/ethereum/go-ethereum/ethdb"
|
|
|
|
"github.com/ethereum/go-ethereum/triedb"
|
2023-09-06 12:53:36 +00:00
|
|
|
|
2024-07-09 11:20:14 +00:00
|
|
|
"github.com/cerc-io/eth-testing/chains/mainnet"
|
2024-04-12 10:16:04 +00:00
|
|
|
statediff "github.com/cerc-io/plugeth-statediff"
|
2023-09-06 12:53:36 +00:00
|
|
|
"github.com/cerc-io/plugeth-statediff/adapt"
|
|
|
|
"github.com/cerc-io/plugeth-statediff/test_helpers"
|
|
|
|
sdtypes "github.com/cerc-io/plugeth-statediff/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Args = statediff.Args
|
|
|
|
type Params = statediff.Params
|
|
|
|
|
|
|
|
type StateObject = sdtypes.StateObject
|
|
|
|
|
|
|
|
func MakeBuilder(sdb state.Database) statediff.Builder {
|
|
|
|
return statediff.NewBuilder(adapt.GethStateView(sdb))
|
|
|
|
}
|
|
|
|
|
2024-04-12 10:16:04 +00:00
|
|
|
func CommitDefaultGenesis(db ethdb.Database) {
|
|
|
|
core.DefaultGenesisBlock().MustCommit(db, triedb.NewDatabase(db, nil))
|
|
|
|
}
|
|
|
|
|
2024-07-09 11:20:14 +00:00
|
|
|
func GetMainnetBlocks() []*types.Block {
|
|
|
|
return mainnet.GetBlocks()
|
|
|
|
}
|
|
|
|
|
2023-09-06 12:53:36 +00:00
|
|
|
func init() {
|
|
|
|
test_helpers.QuietLogs()
|
|
|
|
}
|