Skip to content

Commit

Permalink
bump nim-web3 for correct getPayloadV2 response signature (#4471)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec authored Jan 6, 2023
1 parent 47cb0f7 commit d1b799e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions beacon_chain/eth1/eth1_monitor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -561,15 +561,14 @@ proc getPayloadV1*(

proc getPayloadV2*(
p: Eth1Monitor, payloadId: bellatrix.PayloadID):
Future[engine_api.ExecutionPayloadV2] =
Future[engine_api.ExecutionPayloadV2] {.async.} =
# Eth1 monitor can recycle connections without (external) warning; at least,
# don't crash.
if p.isNil or p.dataProvider.isNil:
let epr = newFuture[engine_api.ExecutionPayloadV2]("getPayload")
epr.complete(default(engine_api.ExecutionPayloadV2))
return epr
return default(engine_api.ExecutionPayloadV2)

p.dataProvider.web3.provider.engine_getPayloadV2(FixedBytes[8] payloadId)
return (await p.dataProvider.web3.provider.engine_getPayloadV2(
FixedBytes[8] payloadId)).executionPayload

proc newPayload*(p: Eth1Monitor, payload: engine_api.ExecutionPayloadV1):
Future[PayloadStatusV1] =
Expand Down

0 comments on commit d1b799e

Please sign in to comment.