mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Don't use the builder network if the head is optimistic (#3412)
## Issue Addressed Resolves https://github.com/sigp/lighthouse/issues/3394 Adds a check in `is_healthy` about whether the head is optimistic when choosing whether to use the builder network. Co-authored-by: realbigsean <sean@sigmaprime.io>
This commit is contained in:
@@ -114,6 +114,7 @@ pub struct BuilderParams {
|
||||
pub enum ChainHealth {
|
||||
Healthy,
|
||||
Unhealthy(FailedCondition),
|
||||
Optimistic,
|
||||
PreMerge,
|
||||
}
|
||||
|
||||
@@ -695,6 +696,9 @@ impl<T: EthSpec> ExecutionLayer<T> {
|
||||
}
|
||||
// Intentional no-op, so we never attempt builder API proposals pre-merge.
|
||||
ChainHealth::PreMerge => (),
|
||||
ChainHealth::Optimistic => info!(self.log(), "The local execution engine is syncing \
|
||||
so the builder network cannot safely be used. Attempting \
|
||||
to build a block with the local execution engine"),
|
||||
}
|
||||
}
|
||||
self.get_full_payload_caching(
|
||||
|
||||
Reference in New Issue
Block a user