mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
beacon/engine, eth/catalyst: return UnknownParent error when parent doesn't exist
This commit is contained in:
parent
508ba1b8a2
commit
9d17826839
2 changed files with 5 additions and 0 deletions
|
|
@ -85,6 +85,7 @@ var (
|
|||
TooLargeRequest = &EngineAPIError{code: -38004, msg: "Too large request"}
|
||||
InvalidParams = &EngineAPIError{code: -32602, msg: "Invalid parameters"}
|
||||
UnsupportedFork = &EngineAPIError{code: -38005, msg: "Unsupported fork"}
|
||||
UnknownParent = &EngineAPIError{code: -38006, msg: "Unknown parent"}
|
||||
|
||||
STATUS_INVALID = ForkChoiceResponse{PayloadStatus: PayloadStatusV1{Status: INVALID}, PayloadID: nil}
|
||||
STATUS_SYNCING = ForkChoiceResponse{PayloadStatus: PayloadStatusV1{Status: SYNCING}, PayloadID: nil}
|
||||
|
|
|
|||
|
|
@ -655,6 +655,10 @@ func (api *ConsensusAPI) GetInclusionListV1(parentHash common.Hash) (types.Inclu
|
|||
return inclusionList, nil
|
||||
}
|
||||
|
||||
if api.eth.BlockChain().GetBlockByHash(parentHash) == nil {
|
||||
return nil, engine.UnknownParent
|
||||
}
|
||||
|
||||
args := &miner.BuildInclusionListArgs{
|
||||
Parent: parentHash,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue