mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Formatting
This commit is contained in:
@@ -480,30 +480,28 @@ impl<T: SlotClock + 'static, E: EthSpec> BlockService<T, E> {
|
|||||||
// Try the proposer nodes last, since it's likely that they don't have a
|
// Try the proposer nodes last, since it's likely that they don't have a
|
||||||
// great view of attestations on the network.
|
// great view of attestations on the network.
|
||||||
let unsigned_block = proposer_fallback
|
let unsigned_block = proposer_fallback
|
||||||
.request_proposers_last(
|
.request_proposers_last(|beacon_node| async move {
|
||||||
|beacon_node| async move {
|
let _get_timer = metrics::start_timer_vec(
|
||||||
let _get_timer = metrics::start_timer_vec(
|
&metrics::BLOCK_SERVICE_TIMES,
|
||||||
&metrics::BLOCK_SERVICE_TIMES,
|
&[metrics::BEACON_BLOCK_HTTP_GET],
|
||||||
&[metrics::BEACON_BLOCK_HTTP_GET],
|
);
|
||||||
);
|
Self::get_validator_block(
|
||||||
Self::get_validator_block(
|
&beacon_node,
|
||||||
&beacon_node,
|
slot,
|
||||||
slot,
|
randao_reveal_ref,
|
||||||
randao_reveal_ref,
|
graffiti,
|
||||||
graffiti,
|
proposer_index,
|
||||||
proposer_index,
|
builder_boost_factor,
|
||||||
builder_boost_factor,
|
log,
|
||||||
log,
|
)
|
||||||
)
|
.await
|
||||||
.await
|
.map_err(|e| {
|
||||||
.map_err(|e| {
|
BlockError::Recoverable(format!(
|
||||||
BlockError::Recoverable(format!(
|
"Error from beacon node when producing block: {:?}",
|
||||||
"Error from beacon node when producing block: {:?}",
|
e
|
||||||
e
|
))
|
||||||
))
|
})
|
||||||
})
|
})
|
||||||
},
|
|
||||||
)
|
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
self_ref
|
self_ref
|
||||||
|
|||||||
@@ -740,18 +740,15 @@ async fn poll_beacon_attesters<T: SlotClock + 'static, E: EthSpec>(
|
|||||||
let subscriptions_ref = &subscriptions;
|
let subscriptions_ref = &subscriptions;
|
||||||
let subscription_result = duties_service
|
let subscription_result = duties_service
|
||||||
.beacon_nodes
|
.beacon_nodes
|
||||||
.request(
|
.request(ApiTopic::Subscriptions, |beacon_node| async move {
|
||||||
ApiTopic::Subscriptions,
|
let _timer = metrics::start_timer_vec(
|
||||||
|beacon_node| async move {
|
&metrics::DUTIES_SERVICE_TIMES,
|
||||||
let _timer = metrics::start_timer_vec(
|
&[metrics::SUBSCRIPTIONS_HTTP_POST],
|
||||||
&metrics::DUTIES_SERVICE_TIMES,
|
);
|
||||||
&[metrics::SUBSCRIPTIONS_HTTP_POST],
|
beacon_node
|
||||||
);
|
.post_validator_beacon_committee_subscriptions(subscriptions_ref)
|
||||||
beacon_node
|
.await
|
||||||
.post_validator_beacon_committee_subscriptions(subscriptions_ref)
|
})
|
||||||
.await
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.await;
|
.await;
|
||||||
if subscription_result.as_ref().is_ok() {
|
if subscription_result.as_ref().is_ok() {
|
||||||
debug!(
|
debug!(
|
||||||
|
|||||||
Reference in New Issue
Block a user