From 54b58fdc01c74c450a786ad128eb960dfab5d914 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Thu, 19 May 2022 06:00:48 +0000 Subject: [PATCH] Log out response status when we hit `PayloadIdUnavailable` (#3190) ## Issue Addressed @z3n-chada is currently getting a `PayloadIdUnavailable` error when connecting lighthouse to Erigon and it's difficult to discern why so this just logs out the response status from the EE when we hit an `PayloadIdUnavailable` error Co-authored-by: realbigsean --- beacon_node/execution_layer/src/lib.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index 3b9e94aab..5aa4edd74 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -660,25 +660,28 @@ impl ExecutionLayer { suggested_fee_recipient, }; - engine + let response = engine .notify_forkchoice_updated( fork_choice_state, Some(payload_attributes), self.log(), ) - .await - .map(|response| response.payload_id)? - .ok_or_else(|| { + .await?; + + match response.payload_id { + Some(payload_id) => payload_id, + None => { error!( self.log(), "Exec engine unable to produce payload"; "msg" => "No payload ID, the engine is likely syncing. \ This has the potential to cause a missed block \ proposal.", + "status" => ?response.payload_status ); - - ApiError::PayloadIdUnavailable - })? + return Err(ApiError::PayloadIdUnavailable); + } + } }; engine