eth/catalyst: fix the bpo1/bpo2

This commit is contained in:
Gary Rong 2025-09-25 00:00:23 +08:00
parent f9a408b957
commit cb0dc099ee

View file

@ -546,8 +546,8 @@ func (api *ConsensusAPI) GetBlobsV1(hashes []common.Hash) ([]*engine.BlobAndProo
// blob pool data. // blob pool data.
func (api *ConsensusAPI) GetBlobsV2(hashes []common.Hash) ([]*engine.BlobAndProofV2, error) { func (api *ConsensusAPI) GetBlobsV2(hashes []common.Hash) ([]*engine.BlobAndProofV2, error) {
head := api.eth.BlockChain().CurrentHeader() head := api.eth.BlockChain().CurrentHeader()
if !api.checkFork(head.Time, forks.Osaka) { if api.config().LatestFork(head.Time) < forks.Osaka {
return nil, unsupportedForkErr("engine_getBlobsV2 is only available at Osaka fork") return nil, unsupportedForkErr("engine_getBlobsV2 is not available before Osaka fork")
} }
if len(hashes) > 128 { if len(hashes) > 128 {
return nil, engine.TooLargeRequest.With(fmt.Errorf("requested blob count too large: %v", len(hashes))) return nil, engine.TooLargeRequest.With(fmt.Errorf("requested blob count too large: %v", len(hashes)))