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