From cc846fae4dc6a0dffa16e183daf08bc2b82f3f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 13 Nov 2019 10:58:15 +0200 Subject: [PATCH] core, eth: fix rebase errors --- core/blockchain_test.go | 4 ++-- core/rawdb/chain_iterator.go | 2 +- eth/protocol_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/blockchain_test.go b/core/blockchain_test.go index a6efc1d840..12ce5dae8d 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -2474,7 +2474,7 @@ func TestSideImportPrunedBlocks(t *testing.T) { blocks, _ := GenerateChain(params.TestChainConfig, genesis, engine, db, 2*TriesInMemory, nil) diskdb := rawdb.NewMemoryDatabase() new(Genesis).MustCommit(diskdb) - chain, err := NewBlockChain(diskdb, nil, params.TestChainConfig, engine, vm.Config{}, nil) + chain, err := NewBlockChain(diskdb, nil, params.TestChainConfig, engine, vm.Config{}, nil, nil) if err != nil { t.Fatalf("failed to create tester chain: %v", err) } @@ -2568,7 +2568,7 @@ func TestDeleteCreateRevert(t *testing.T) { diskdb := rawdb.NewMemoryDatabase() gspec.MustCommit(diskdb) - chain, err := NewBlockChain(diskdb, nil, params.TestChainConfig, engine, vm.Config{}, nil) + chain, err := NewBlockChain(diskdb, nil, params.TestChainConfig, engine, vm.Config{}, nil, nil) if err != nil { t.Fatalf("failed to create tester chain: %v", err) } diff --git a/core/rawdb/chain_iterator.go b/core/rawdb/chain_iterator.go index 96ead329d8..7dfe69d70f 100644 --- a/core/rawdb/chain_iterator.go +++ b/core/rawdb/chain_iterator.go @@ -213,7 +213,7 @@ func UnindexTransactions(db ethdb.Database, from uint64, to uint64) { // will be left in the database if crash happens but it's fine. WriteTxIndexTail(db, to) - // If only one block is unindexed, do it direclty + // If only one block is unindexed, do it directly if from+1 == to { DeleteTxLookupEntries(db, ReadBlock(db, ReadCanonicalHash(db, from), from)) log.Info("Unindexed transactions", "blocks", 1, "tail", to) diff --git a/eth/protocol_test.go b/eth/protocol_test.go index ca418942bb..1d2cf3922c 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -174,8 +174,8 @@ func TestForkIDSplit(t *testing.T) { genesisNoFork = gspecNoFork.MustCommit(dbNoFork) genesisProFork = gspecProFork.MustCommit(dbProFork) - chainNoFork, _ = core.NewBlockChain(dbNoFork, nil, configNoFork, engine, vm.Config{}, nil) - chainProFork, _ = core.NewBlockChain(dbProFork, nil, configProFork, engine, vm.Config{}, nil) + chainNoFork, _ = core.NewBlockChain(dbNoFork, nil, configNoFork, engine, vm.Config{}, nil, nil) + chainProFork, _ = core.NewBlockChain(dbProFork, nil, configProFork, engine, vm.Config{}, nil, nil) blocksNoFork, _ = core.GenerateChain(configNoFork, genesisNoFork, engine, dbNoFork, 2, nil) blocksProFork, _ = core.GenerateChain(configProFork, genesisProFork, engine, dbProFork, 2, nil)