Skip to content

Commit 4a231cd

Browse files
authored
internal/ethapi: return non-null "number" for pending block (#20616)
Fixes: #20587, ApeWorX/web3.py#1572
1 parent 976a0f5 commit 4a231cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎internal/ethapi/api.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.B
642642
response, err := s.rpcMarshalBlock(block, true, fullTx)
643643
if err == nil && number == rpc.PendingBlockNumber {
644644
// Pending blocks need to nil out a few fields
645-
for _, field := range []string{"hash", "nonce", "miner", "number"} {
645+
for _, field := range []string{"hash", "nonce", "miner"} {
646646
response[field] = nil
647647
}
648648
}

0 commit comments

Comments
 (0)