Skip to content

Commit

Permalink
fix crash when calling MEV rpc with MEV disabled (#4389)
Browse files Browse the repository at this point in the history
Avoid `/eth/v1/beacon/blinded_blocks` crash without `--payload-builder`.
  • Loading branch information
etan-status authored Dec 5, 2022
1 parent 55a95bc commit 996a0bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions beacon_chain/validators/message_router_mev.nim
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ proc unblindAndRouteBlockMEV*(
Future[Result[Opt[BlockRef], string]] {.async.} =
# By time submitBlindedBlock is called, must already have done slashing
# protection check
if node.payloadBuilderRestClient.isNil:
return err "unblindAndRouteBlockMEV: nil REST client"

let unblindedPayload =
try:
awaitWithTimeout(
Expand Down

0 comments on commit 996a0bd

Please sign in to comment.