Skip to content

Commit

Permalink
internal/ethapi: return non-null "number" for pending block (#20616)
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman authored Feb 7, 2020
1 parent 976a0f5 commit 4a231cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 4a231cd

Please sign in to comment.