diff --git a/beacon_chain/eth1/eth1_monitor.nim b/beacon_chain/eth1/eth1_monitor.nim index 7f70cc2ba..761ff9280 100644 --- a/beacon_chain/eth1/eth1_monitor.nim +++ b/beacon_chain/eth1/eth1_monitor.nim @@ -449,7 +449,7 @@ proc getPayload*(p: Eth1Monitor, payloadId: bellatrix.PayloadID): Future[engine_api.ExecutionPayloadV1] = # Eth1 monitor can recycle connections without (external) warning; at least, # don't crash. - if p.dataProvider.isNil: + if p.isNil or p.dataProvider.isNil: var epr: Future[engine_api.ExecutionPayloadV1] epr.complete(default(engine_api.ExecutionPayloadV1)) return epr @@ -472,7 +472,7 @@ proc forkchoiceUpdated*(p: Eth1Monitor, Future[engine_api.ForkchoiceUpdatedResponse] = # Eth1 monitor can recycle connections without (external) warning; at least, # don't crash. - if p.dataProvider.isNil: + if p.isNil or p.dataProvider.isNil: var fcuR: Future[engine_api.ForkchoiceUpdatedResponse] fcuR.complete(engine_api.ForkchoiceUpdatedResponse( payloadStatus: PayloadStatusV1(status: PayloadExecutionStatus.syncing))) @@ -498,7 +498,7 @@ proc forkchoiceUpdated*(p: Eth1Monitor, Future[engine_api.ForkchoiceUpdatedResponse] = # Eth1 monitor can recycle connections without (external) warning; at least, # don't crash. - if p.dataProvider.isNil: + if p.isNil or p.dataProvider.isNil: var fcuR: Future[engine_api.ForkchoiceUpdatedResponse] fcuR.complete(engine_api.ForkchoiceUpdatedResponse( payloadStatus: PayloadStatusV1(status: PayloadExecutionStatus.syncing)))