Skip to content

Commit

Permalink
Fixed VC panic when fee-recipient-file is unreadable
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Jan 18, 2022
1 parent 815b4de commit 60b9c39
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion beacon_node/execution_layer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl ExecutionLayer {
) -> Result<(), Error> {
info!(
self.log(),
"Received proposer preperation data";
"Received proposer preparation data";
"count" => preparation_data.len(),
);

Expand Down
13 changes: 11 additions & 2 deletions validator_client/src/preparation_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,16 @@ impl<T: SlotClock + 'static, E: EthSpec> PreparationService<T, E> {
self.slot_clock.duration_to_next_epoch(E::slots_per_epoch())
{
sleep(duration_to_next_epoch).await;
self.prepare_proposers_and_publish().await.unwrap();
self.prepare_proposers_and_publish()
.await
.map_err(|e| {
error!(
log,
"Error during proposer preparation";
"error" => format!("{:?}", e),
)
})
.unwrap_or(());
} else {
error!(log, "Failed to read slot clock");
// If we can't read the slot clock, just wait another slot.
Expand All @@ -168,7 +177,7 @@ impl<T: SlotClock + 'static, E: EthSpec> PreparationService<T, E> {
.clone()
.unwrap()
.read_fee_recipient_file()
.unwrap();
.map_err(|e| format!("Error loading fee-recipient file: {:?}", e))?;
}

let preparation_data: Vec<_> = all_pubkeys
Expand Down

0 comments on commit 60b9c39

Please sign in to comment.