From 57f2ad1118093e418a6834db38742f301a77fb07 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 12 Sep 2024 18:18:12 +0200 Subject: [PATCH] internal/ethapi: return requests as hex --- internal/ethapi/api.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 7981f35ae3..c7429f5035 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1437,7 +1437,12 @@ func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool, config *param fields["withdrawals"] = block.Withdrawals() } 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 }