mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Update fork choice
This commit is contained in:
@@ -7267,7 +7267,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
)
|
||||
}
|
||||
|
||||
pub async fn set_unsatisfied_inclusion_list_block(self: &Arc<Self>, block_root: Hash256) -> Result<(), Error> {
|
||||
pub async fn set_unsatisfied_inclusion_list_block(
|
||||
self: &Arc<Self>,
|
||||
block_root: Hash256,
|
||||
) -> Result<(), Error> {
|
||||
let chain = self.clone();
|
||||
let fork_choice_result = self
|
||||
.spawn_blocking_handle(
|
||||
@@ -7294,7 +7297,9 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
}
|
||||
|
||||
pub fn on_verified_inclusion_list(&self, signed_il: SignedInclusionList<T::EthSpec>) {
|
||||
self.inclusion_list_cache.write().on_inclusion_list(signed_il);
|
||||
self.inclusion_list_cache
|
||||
.write()
|
||||
.on_inclusion_list(signed_il);
|
||||
}
|
||||
|
||||
pub fn metrics(&self) -> BeaconChainMetrics {
|
||||
|
||||
@@ -356,8 +356,8 @@ where
|
||||
self.unsatisfied_inclusion_list_block = block_root;
|
||||
}
|
||||
|
||||
fn unsatisfied_inclusion_list_block(&self) -> Hash256 {
|
||||
self.unsatisfied_inclusion_list_block
|
||||
fn unsatisfied_inclusion_list_block(&self) -> &Hash256 {
|
||||
&self.unsatisfied_inclusion_list_block
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,9 @@ async fn notify_new_payload<'a, T: BeaconChainTypes>(
|
||||
// transactions for this slot, update the fork choice store before processing
|
||||
// the invalid EL payload.
|
||||
if *validation_error == Some("INVALID_INCLUSION_LIST".to_string()) {
|
||||
chain.set_unsatisfied_inclusion_list_block(block.tree_hash_root()).await?;
|
||||
chain
|
||||
.set_unsatisfied_inclusion_list_block(block.tree_hash_root())
|
||||
.await?;
|
||||
}
|
||||
|
||||
chain
|
||||
|
||||
Reference in New Issue
Block a user