@@ -507,21 +507,22 @@ func TestWriteAncientHeaderChain(t *testing.T) {
507507 var headers []* types.Header
508508 headers = append (headers , & types.Header {
509509 Number : big .NewInt (0 ),
510+ Difficulty : big .NewInt (2 ),
510511 Extra : []byte ("test block" ),
511512 UncleHash : types .EmptyUncleHash ,
512513 TxHash : types .EmptyTxsHash ,
513514 ReceiptHash : types .EmptyReceiptsHash ,
514515 })
515516 headers = append (headers , & types.Header {
516517 Number : big .NewInt (1 ),
518+ Difficulty : big .NewInt (2 ),
517519 Extra : []byte ("test block" ),
518520 UncleHash : types .EmptyUncleHash ,
519521 TxHash : types .EmptyTxsHash ,
520522 ReceiptHash : types .EmptyReceiptsHash ,
521523 })
522524 // Write and verify the header in the database
523- ptd := new (big.Int )
524- WriteAncientHeaderChain (db , headers , ptd )
525+ WriteAncientHeaderChain (db , headers , new (big.Int ))
525526
526527 for _ , header := range headers {
527528 if blob := ReadHeaderRLP (db , header .Hash (), header .Number .Uint64 ()); len (blob ) == 0 {
0 commit comments