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
479479 }
480480 api .invalidTipsets [head ] = invalid
481481 }
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+ }
482487 failure := "links to previously rejected block"
483488 return & beacon.PayloadStatusV1 {
484489 Status : beacon .INVALID ,
485- LatestValidHash : & invalid . ParentHash ,
490+ LatestValidHash : lastValid ,
486491 ValidationError : & failure ,
487492 }
488493}
You can’t perform that action at this time.
0 commit comments