Refactor error handling for GetBlobsV1 method

This commit is contained in:
rjl493456442 2025-09-24 22:21:29 +08:00 committed by GitHub
parent 78bbbba4b5
commit 4fcd663a89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -495,7 +495,7 @@ func (api *ConsensusAPI) GetBlobsV1(hashes []common.Hash) ([]*engine.BlobAndProo
// Check if Osaka fork is active
// follow https://github.com/ethereum/execution-apis/blob/main/src/engine/osaka.md#cancun-api
if header := api.eth.BlockChain().CurrentHeader(); api.config().IsOsaka(header.Number, header.Time) {
return nil, engine.UnsupportedFork.With(fmt.Errorf("engine_getBlobsV1 is not supported after Osaka fork activation"))
return nil, unsupportedForkErr("engine_getBlobsV1 is not supported after Osaka fork")
}
if len(hashes) > 128 {