mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
internal/ethapi: avoid copying header
This commit is contained in:
parent
57f2ad1118
commit
c1c8a2c46d
1 changed files with 2 additions and 2 deletions
|
|
@ -1433,10 +1433,10 @@ func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool, config *param
|
|||
uncleHashes[i] = uncle.Hash()
|
||||
}
|
||||
fields["uncles"] = uncleHashes
|
||||
if block.Header().WithdrawalsHash != nil {
|
||||
if block.Withdrawals() != nil {
|
||||
fields["withdrawals"] = block.Withdrawals()
|
||||
}
|
||||
if block.Header().RequestsHash != nil {
|
||||
if block.Requests() != nil {
|
||||
// Convert requests to hex.
|
||||
hexreq := make([]hexutil.Bytes, len(block.Requests()))
|
||||
for i, req := range block.Requests() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue