store: use db iterators for pruning and range-based queries (#5848)

This commit is contained in:
Callum Waters
2021-01-08 13:12:54 +01:00
committed by GitHub
parent 66ba12d9bc
commit 385ea1db7d
13 changed files with 269 additions and 647 deletions

View File

@@ -54,7 +54,7 @@ func TestLightClientAttackEvidence_Lunatic(t *testing.T) {
},
primary,
[]provider.Provider{witness},
dbs.New(dbm.NewMemDB(), chainID),
dbs.New(dbm.NewMemDB()),
light.Logger(log.TestingLogger()),
light.MaxRetryAttempts(1),
)
@@ -136,7 +136,7 @@ func TestLightClientAttackEvidence_Equivocation(t *testing.T) {
},
primary,
[]provider.Provider{witness},
dbs.New(dbm.NewMemDB(), chainID),
dbs.New(dbm.NewMemDB()),
light.Logger(log.TestingLogger()),
light.MaxRetryAttempts(1),
verificationOption,
@@ -191,7 +191,7 @@ func TestClientDivergentTraces1(t *testing.T) {
},
primary,
[]provider.Provider{witness},
dbs.New(dbm.NewMemDB(), chainID),
dbs.New(dbm.NewMemDB()),
light.Logger(log.TestingLogger()),
light.MaxRetryAttempts(1),
)
@@ -215,7 +215,7 @@ func TestClientDivergentTraces2(t *testing.T) {
},
primary,
[]provider.Provider{deadNode, deadNode, primary},
dbs.New(dbm.NewMemDB(), chainID),
dbs.New(dbm.NewMemDB()),
light.Logger(log.TestingLogger()),
light.MaxRetryAttempts(1),
)
@@ -250,7 +250,7 @@ func TestClientDivergentTraces3(t *testing.T) {
},
primary,
[]provider.Provider{witness},
dbs.New(dbm.NewMemDB(), chainID),
dbs.New(dbm.NewMemDB()),
light.Logger(log.TestingLogger()),
light.MaxRetryAttempts(1),
)