light: remove test panic (#7588)

This commit is contained in:
Sam Kleinman
2022-01-14 13:16:43 -05:00
committed by GitHub
parent 82b65868ce
commit 887cb219ab
5 changed files with 1082 additions and 1076 deletions

View File

@@ -64,7 +64,7 @@ func BenchmarkSequence(b *testing.B) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
headers, vals, _ := genLightBlocksWithKeys(chainID, 1000, 100, 1, bTime)
headers, vals, _ := genLightBlocksWithKeys(b, chainID, 1000, 100, 1, bTime)
benchmarkFullNode := newProviderBenchmarkImpl(headers, vals)
genesisBlock, _ := benchmarkFullNode.LightBlock(ctx, 1)
@@ -101,7 +101,7 @@ func BenchmarkBisection(b *testing.B) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
headers, vals, _ := genLightBlocksWithKeys(chainID, 1000, 100, 1, bTime)
headers, vals, _ := genLightBlocksWithKeys(b, chainID, 1000, 100, 1, bTime)
benchmarkFullNode := newProviderBenchmarkImpl(headers, vals)
genesisBlock, _ := benchmarkFullNode.LightBlock(ctx, 1)
@@ -137,7 +137,7 @@ func BenchmarkBackwards(b *testing.B) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
headers, vals, _ := genLightBlocksWithKeys(chainID, 1000, 100, 1, bTime)
headers, vals, _ := genLightBlocksWithKeys(b, chainID, 1000, 100, 1, bTime)
benchmarkFullNode := newProviderBenchmarkImpl(headers, vals)
trustedBlock, _ := benchmarkFullNode.LightBlock(ctx, 0)