Skip to content

Commit

Permalink
Remove duplicate log in BN fallback (#2116)
Browse files Browse the repository at this point in the history
## Issue Addressed

NA

## Proposed Changes

- Removes a duplicated log in the fallback code for the VC.
- Updates the text in the remaining de-duped log.

## Additional Info

Example

```
Dec 23 05:19:54.003 WARN Beacon node is syncing                  endpoint: http://xxxx:5052/, head_slot: 88224, sync_distance: 161774
Dec 23 05:19:54.003 WARN Beacon node is not synced               endpoint: http://xxxxx:5052/
```
  • Loading branch information
paulhauner committed Jan 6, 2021
1 parent d1248db commit 043e5cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 1 addition & 11 deletions validator_client/src/beacon_node_fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,7 @@ impl<E: EthSpec> CandidateBeaconNode<E> {
log: &Logger,
) -> Result<(), CandidateError> {
if let Some(slot_clock) = slot_clock {
match check_synced(&self.beacon_node, slot_clock, Some(log)).await {
r @ Err(CandidateError::NotSynced) => {
warn!(
log,
"Beacon node is not synced";
"endpoint" => %self.beacon_node,
);
r
}
result => result,
}
check_synced(&self.beacon_node, slot_clock, Some(log)).await
} else {
// Skip this check if we don't supply a slot clock.
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion validator_client/src/check_synced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub async fn check_synced<T: SlotClock>(

warn!(
log,
"Beacon node is syncing";
"Beacon node is not synced";
"sync_distance" => resp.data.sync_distance.as_u64(),
"head_slot" => resp.data.head_slot.as_u64(),
"endpoint" => %beacon_node,
Expand Down

0 comments on commit 043e5cb

Please sign in to comment.