@@ -1289,14 +1289,17 @@ func TestCanonicalBlockRetrieval(t *testing.T) {
12891289 continue // busy wait for canonical hash to be written
12901290 }
12911291 if ch != block .Hash () {
1292- t .Fatalf ("unknown canonical hash, want %s, got %s" , block .Hash ().Hex (), ch .Hex ())
1292+ t .Errorf ("unknown canonical hash, want %s, got %s" , block .Hash ().Hex (), ch .Hex ())
1293+ return
12931294 }
12941295 fb := rawdb .ReadBlock (blockchain .db , ch , block .NumberU64 ())
12951296 if fb == nil {
1296- t .Fatalf ("unable to retrieve block %d for canonical hash: %s" , block .NumberU64 (), ch .Hex ())
1297+ t .Errorf ("unable to retrieve block %d for canonical hash: %s" , block .NumberU64 (), ch .Hex ())
1298+ return
12971299 }
12981300 if fb .Hash () != block .Hash () {
1299- t .Fatalf ("invalid block hash for block %d, want %s, got %s" , block .NumberU64 (), block .Hash ().Hex (), fb .Hash ().Hex ())
1301+ t .Errorf ("invalid block hash for block %d, want %s, got %s" , block .NumberU64 (), block .Hash ().Hex (), fb .Hash ().Hex ())
1302+ return
13001303 }
13011304 return
13021305 }
@@ -1916,13 +1919,6 @@ func testInsertKnownChainData(t *testing.T, typ string) {
19161919 inserter func (blocks []* types.Block , receipts []types.Receipts ) error
19171920 asserter func (t * testing.T , block * types.Block )
19181921 )
1919- headers , headers2 := make ([]* types.Header , 0 , len (blocks )), make ([]* types.Header , 0 , len (blocks2 ))
1920- for _ , block := range blocks {
1921- headers = append (headers , block .Header ())
1922- }
1923- for _ , block := range blocks2 {
1924- headers2 = append (headers2 , block .Header ())
1925- }
19261922 if typ == "headers" {
19271923 inserter = func (blocks []* types.Block , receipts []types.Receipts ) error {
19281924 headers := make ([]* types.Header , 0 , len (blocks ))
0 commit comments