aboutsummaryrefslogtreecommitdiffstats
path: root/light/lightchain_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'light/lightchain_test.go')
-rw-r--r--light/lightchain_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/light/lightchain_test.go b/light/lightchain_test.go
index 5f0baaf4c..d45c0656d 100644
--- a/light/lightchain_test.go
+++ b/light/lightchain_test.go
@@ -55,7 +55,7 @@ func newCanonical(n int) (ethdb.Database, *LightChain, error) {
db := ethdb.NewMemDatabase()
gspec := core.Genesis{Config: params.TestChainConfig}
genesis := gspec.MustCommit(db)
- blockchain, _ := NewLightChain(&dummyOdr{db: db}, gspec.Config, ethash.NewFaker())
+ blockchain, _ := NewLightChain(&dummyOdr{db: db, indexerConfig: TestClientIndexerConfig}, gspec.Config, ethash.NewFaker())
// Create and inject the requested chain
if n == 0 {
@@ -265,7 +265,8 @@ func makeHeaderChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.
type dummyOdr struct {
OdrBackend
- db ethdb.Database
+ db ethdb.Database
+ indexerConfig *IndexerConfig
}
func (odr *dummyOdr) Database() ethdb.Database {
@@ -276,6 +277,10 @@ func (odr *dummyOdr) Retrieve(ctx context.Context, req OdrRequest) error {
return nil
}
+func (odr *dummyOdr) IndexerConfig() *IndexerConfig {
+ return odr.indexerConfig
+}
+
// Tests that reorganizing a long difficult chain after a short easy one
// overwrites the canonical numbers and links in the database.
func TestReorgLongHeaders(t *testing.T) {