Update Geth to 1.13
This commit is contained in:
@@ -35,7 +35,10 @@ func testReadChainData(t *testing.T, data *chaindata.Paths) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
it := tree.NodeIterator(nil)
|
||||
it, err := tree.NodeIterator(nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for it.Next(true) {
|
||||
}
|
||||
if err := it.Error(); err != nil {
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/core/rawdb"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
"github.com/ethereum/go-ethereum/triedb"
|
||||
)
|
||||
|
||||
const LatestBlock uint = 3
|
||||
@@ -25,7 +26,7 @@ func GetBlocks() []*types.Block {
|
||||
return blocks
|
||||
}
|
||||
db := rawdb.NewMemoryDatabase()
|
||||
genesisBlock := core.DefaultGenesisBlock().MustCommit(db)
|
||||
genesisBlock := core.DefaultGenesisBlock().MustCommit(db, triedb.NewDatabase(db, nil))
|
||||
genRLP, err := rlp.EncodeToBytes(genesisBlock)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
@@ -7,13 +7,14 @@ import (
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/rawdb"
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
"github.com/ethereum/go-ethereum/triedb"
|
||||
|
||||
"github.com/cerc-io/eth-testing/chaindata/mainnet"
|
||||
)
|
||||
|
||||
func TestLoadChain(t *testing.T) {
|
||||
db := rawdb.NewMemoryDatabase()
|
||||
core.DefaultGenesisBlock().MustCommit(db)
|
||||
core.DefaultGenesisBlock().MustCommit(db, triedb.NewDatabase(db, nil))
|
||||
blocks := mainnet.GetBlocks()
|
||||
chain, _ := core.NewBlockChain(db, nil, nil, nil, ethash.NewFaker(), vm.Config{}, nil, nil)
|
||||
_, err := chain.InsertChain(blocks[1:])
|
||||
|
||||
Reference in New Issue
Block a user