Skip to content

Commit d9fa02c

Browse files
geokneeprotolambda
authored andcommitted
op-service: add RequestsHash to RPCHeader (ethereum-optimism#14022)
* add RequestsHash to op-service RPCHeader type * sources.RPCHeader.RequestsHash needs "requestsHash" json struct tag not "requestsHash" as in geth * remove comment This was fixed upstream ethereum/go-ethereum#30926 * add comment * Update op-service/sources/types.go Co-authored-by: protolambda <[email protected]> --------- Co-authored-by: protolambda <[email protected]>
1 parent 1dbef1e commit d9fa02c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

op-service/sources/types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ type RPCHeader struct {
6161
// ParentBeaconRoot was added by EIP-4788 and is ignored in legacy headers.
6262
ParentBeaconRoot *common.Hash `json:"parentBeaconBlockRoot,omitempty"`
6363

64+
// RequestsHash was added by EIP-7685 and is ignored in legacy headers.
65+
RequestsHash *common.Hash `json:"requestsHash,omitempty" rlp:"optional"`
66+
6467
// untrusted info included by RPC, may have to be checked
6568
Hash common.Hash `json:"hash"`
6669
}
@@ -116,6 +119,8 @@ func (hdr *RPCHeader) CreateGethHeader() *types.Header {
116119
BlobGasUsed: (*uint64)(hdr.BlobGasUsed),
117120
ExcessBlobGas: (*uint64)(hdr.ExcessBlobGas),
118121
ParentBeaconRoot: hdr.ParentBeaconRoot,
122+
// Prague
123+
RequestsHash: hdr.RequestsHash,
119124
}
120125
}
121126

0 commit comments

Comments
 (0)