testConnectBlocks uses looser limits
This commit is contained in:
parent
d477ed7249
commit
9588d3510c
@ -27,20 +27,17 @@ func testConnectBlocks(t *testing.T, h *TestHandler) {
|
||||
}
|
||||
}, true)
|
||||
if err != nil {
|
||||
if err.Error() != fmt.Sprintf("connectBlocks interrupted at height %d", rng.Upper) {
|
||||
if !strings.HasPrefix(err.Error(), "connectBlocks interrupted at height") {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
height, hash, err := d.GetBestBlock()
|
||||
height, _, err := d.GetBestBlock()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if height != rng.Upper {
|
||||
t.Fatalf("Upper block height mismatch: %d != %d", height, rng.Upper)
|
||||
}
|
||||
if hash != upperHash {
|
||||
t.Fatalf("Upper block hash mismatch: %s != %s", hash, upperHash)
|
||||
if height < rng.Upper {
|
||||
t.Fatalf("Best block height mismatch: %d < %d", height, rng.Upper)
|
||||
}
|
||||
|
||||
t.Run("verifyBlockInfo", func(t *testing.T) { verifyBlockInfo(t, d, h, rng) })
|
||||
@ -68,10 +65,10 @@ func testConnectBlocksParallel(t *testing.T, h *TestHandler) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if height != rng.Upper {
|
||||
t.Fatalf("Upper block height mismatch: %d != %d", height, rng.Upper)
|
||||
t.Fatalf("Best block height mismatch: %d != %d", height, rng.Upper)
|
||||
}
|
||||
if hash != upperHash {
|
||||
t.Fatalf("Upper block hash mismatch: %s != %s", hash, upperHash)
|
||||
t.Fatalf("Best block hash mismatch: %s != %s", hash, upperHash)
|
||||
}
|
||||
|
||||
t.Run("verifyBlockInfo", func(t *testing.T) { verifyBlockInfo(t, d, h, rng) })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user