mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
internal/ethapi: revert change from #20460, return number on pending block
This commit is contained in:
parent
15d09038a6
commit
699ad14d5e
1 changed files with 1 additions and 1 deletions
|
|
@ -642,7 +642,7 @@ func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.B
|
||||||
response, err := s.rpcMarshalBlock(block, true, fullTx)
|
response, err := s.rpcMarshalBlock(block, true, fullTx)
|
||||||
if err == nil && number == rpc.PendingBlockNumber {
|
if err == nil && number == rpc.PendingBlockNumber {
|
||||||
// Pending blocks need to nil out a few fields
|
// 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
|
response[field] = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue