Skip to content

Commit

Permalink
Remove targetBlobsPerBlock from GetPayloadResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko committed Nov 1, 2024
1 parent 5555937 commit 57a53ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion web3/engine_api_types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ type
blobsBundle*: BlobsBundleV1
shouldOverrideBuilder*: bool
executionRequests*: array[3, seq[byte]]
targetBlobsPerBlock*: Quantity

SomeGetPayloadResponse* =
ExecutionPayloadV1 |
Expand Down
5 changes: 1 addition & 4 deletions web3/execution_types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ type
blobsBundle*: Opt[BlobsBundleV1]
shouldOverrideBuilder*: Opt[bool]
executionRequests*: Opt[array[3, seq[byte]]]
targetBlobsPerBlock*: Opt[Quantity]

Version* {.pure.} = enum
V1
Expand All @@ -84,7 +83,7 @@ func version*(attr: PayloadAttributes): Version =
Version.V1

func version*(res: GetPayloadResponse): Version =
if res.executionRequests.isSome or res.targetBlobsPerBlock.isSome:
if res.executionRequests.isSome:
Version.V4
elif res.blobsBundle.isSome or res.shouldOverrideBuilder.isSome:
Version.V3
Expand Down Expand Up @@ -422,7 +421,6 @@ func V4*(res: GetPayloadResponse): GetPayloadV4Response =
blobsBundle: res.blobsBundle.get(BlobsBundleV1()),
shouldOverrideBuilder: res.shouldOverrideBuilder.get(false),
executionRequests: res.executionRequests.get,
targetBlobsPerBlock: res.targetBlobsPerBlock.get,
)

func getPayloadResponse*(x: ExecutionPayloadV1): GetPayloadResponse =
Expand All @@ -449,5 +447,4 @@ func getPayloadResponse*(x: GetPayloadV4Response): GetPayloadResponse =
blobsBundle: Opt.some(x.blobsBundle),
shouldOverrideBuilder: Opt.some(x.shouldOverrideBuilder),
executionRequests: Opt.some(x.executionRequests),
targetBlobsPerBlock: Opt.some(x.targetBlobsPerBlock),
)

0 comments on commit 57a53ee

Please sign in to comment.