From 8dda17706e074137872eafb97030e6846be50af0 Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Tue, 6 Jun 2023 12:23:27 +0200 Subject: [PATCH] Fix pending block when no RPCEthCompatibility The RPCEthCompatibility check was not intended here. See https://github.com/celo-org/celo-blockchain/pull/2062#discussion_r1218286282 --- internal/ethapi/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index e640a59f07..d54b319bc7 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -711,7 +711,7 @@ func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.B if err == nil { addEthCompatibilityFields(ctx, response, s.b, block) - if s.b.RPCEthCompatibility() && number == rpc.PendingBlockNumber { + if number == rpc.PendingBlockNumber { // Pending blocks need to nil out a few fields for _, field := range []string{"hash", "nonce", "miner"} { response[field] = nil