Update eth-testing #7
@ -5,8 +5,11 @@ package statediff
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/state"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
|
||||
"github.com/cerc-io/eth-testing/chaindata/mainnet"
|
||||
"github.com/ethereum/go-ethereum/statediff"
|
||||
sdtypes "github.com/ethereum/go-ethereum/statediff/types"
|
||||
)
|
||||
@ -27,3 +30,7 @@ func CommitDefaultGenesis(db ethdb.Database) {
|
||||
func init() {
|
||||
log.Root().SetHandler(log.DiscardHandler())
|
||||
}
|
||||
|
||||
func GetMainnetBlocks() []*types.Block {
|
||||
return mainnet.GetBlocks()
|
||||
}
|
||||
|
@ -5,9 +5,11 @@ package statediff
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/state"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/triedb"
|
||||
|
||||
"github.com/cerc-io/eth-testing/chains/mainnet"
|
||||
statediff "github.com/cerc-io/plugeth-statediff"
|
||||
"github.com/cerc-io/plugeth-statediff/adapt"
|
||||
"github.com/cerc-io/plugeth-statediff/test_helpers"
|
||||
@ -27,6 +29,10 @@ func CommitDefaultGenesis(db ethdb.Database) {
|
||||
core.DefaultGenesisBlock().MustCommit(db, triedb.NewDatabase(db, nil))
|
||||
}
|
||||
|
||||
func GetMainnetBlocks() []*types.Block {
|
||||
return mainnet.GetBlocks()
|
||||
}
|
||||
|
||||
func init() {
|
||||
test_helpers.QuietLogs()
|
||||
}
|
||||
|
@ -5,9 +5,11 @@ package statediff
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/state"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/triedb"
|
||||
|
||||
"github.com/cerc-io/eth-testing/chains/mainnet"
|
||||
statediff "github.com/cerc-io/plugeth-statediff"
|
||||
"github.com/cerc-io/plugeth-statediff/adapt"
|
||||
"github.com/cerc-io/plugeth-statediff/test_helpers"
|
||||
@ -32,3 +34,7 @@ func CommitDefaultGenesis(db ethdb.Database) {
|
||||
func init() {
|
||||
test_helpers.QuietLogs()
|
||||
}
|
||||
|
||||
func GetMainnetBlocks() []*types.Block {
|
||||
return mainnet.GetBlocks()
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ import (
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
|
||||
"github.com/cerc-io/eth-statediff-compliance/internal/statediff"
|
||||
"github.com/cerc-io/eth-testing/chains/mainnet"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -25,7 +24,7 @@ var (
|
||||
func loadChain() {
|
||||
db := rawdb.NewMemoryDatabase()
|
||||
statediff.CommitDefaultGenesis(db)
|
||||
blocks = mainnet.GetBlocks()
|
||||
blocks = statediff.GetMainnetBlocks()
|
||||
chain, _ = core.NewBlockChain(db, nil, nil, nil, ethash.NewFaker(), vm.Config{}, nil, nil)
|
||||
_, err := chain.InsertChain(blocks[1:])
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user