소스 검색

internal/ethapi: return non-null "number" for pending block (#20616)

Fixes: #20587, ethereum/web3.py#1572
Martin Holst Swende 5 년 전
부모
커밋
4a231cd951
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      internal/ethapi/api.go

+ 1 - 1
internal/ethapi/api.go

@@ -642,7 +642,7 @@ func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.B
 		response, err := s.rpcMarshalBlock(block, true, fullTx)
 		if err == nil && number == rpc.PendingBlockNumber {
 			// Pending blocks need to nil out a few fields
-			for _, field := range []string{"hash", "nonce", "miner", "number"} {
+			for _, field := range []string{"hash", "nonce", "miner"} {
 				response[field] = nil
 			}
 		}