File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -479,10 +479,15 @@ func (api *ConsensusAPI) checkInvalidAncestor(check common.Hash, head common.Has
479
479
}
480
480
api .invalidTipsets [head ] = invalid
481
481
}
482
+ // If the last valid hash is the terminal pow block, return 0x0 for latest valid hash
483
+ lastValid := & invalid .ParentHash
484
+ if header := api .eth .BlockChain ().GetHeader (invalid .ParentHash , invalid .Number .Uint64 ()- 1 ); header != nil && header .Difficulty .Sign () != 0 {
485
+ lastValid = & common.Hash {}
486
+ }
482
487
failure := "links to previously rejected block"
483
488
return & beacon.PayloadStatusV1 {
484
489
Status : beacon .INVALID ,
485
- LatestValidHash : & invalid . ParentHash ,
490
+ LatestValidHash : lastValid ,
486
491
ValidationError : & failure ,
487
492
}
488
493
}
You can’t perform that action at this time.
0 commit comments