From aa5b79f42880fcb60dcbb057e50a6e3cea576d02 Mon Sep 17 00:00:00 2001 From: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com> Date: Mon, 23 Jan 2023 14:28:46 +0100 Subject: [PATCH] Replace INVALID_BLOCK_HASH with INVALID (#6671) See https://github.com/ethereum/execution-apis/pull/338 --- ethdb/privateapi/ethbackend.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ethdb/privateapi/ethbackend.go b/ethdb/privateapi/ethbackend.go index 43e576e61..ae8711c63 100644 --- a/ethdb/privateapi/ethbackend.go +++ b/ethdb/privateapi/ethbackend.go @@ -319,7 +319,10 @@ func (s *EthBackendServer) EngineNewPayload(ctx context.Context, req *types2.Exe blockHash := gointerfaces.ConvertH256ToHash(req.BlockHash) if header.Hash() != blockHash { log.Error("[NewPayload] invalid block hash", "stated", libcommon.Hash(blockHash), "actual", header.Hash()) - return &remote.EnginePayloadStatus{Status: remote.EngineStatus_INVALID_BLOCK_HASH}, nil + return &remote.EnginePayloadStatus{ + Status: remote.EngineStatus_INVALID, + ValidationError: "invalid block hash", + }, nil } for _, txn := range req.Transactions { @@ -327,7 +330,6 @@ func (s *EthBackendServer) EngineNewPayload(ctx context.Context, req *types2.Exe log.Warn("[NewPayload] typed txn marshalled as RLP string", "txn", common.Bytes2Hex(txn)) return &remote.EnginePayloadStatus{ Status: remote.EngineStatus_INVALID, - LatestValidHash: nil, ValidationError: "typed txn marshalled as RLP string", }, nil } @@ -338,7 +340,6 @@ func (s *EthBackendServer) EngineNewPayload(ctx context.Context, req *types2.Exe log.Warn("[NewPayload] failed to decode transactions", "err", err) return &remote.EnginePayloadStatus{ Status: remote.EngineStatus_INVALID, - LatestValidHash: nil, ValidationError: err.Error(), }, nil }