mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Merge branch 'master' into signature-scheme-update
This commit is contained in:
@@ -357,6 +357,7 @@ where
|
||||
self.fork_choice.write().add_attestation(
|
||||
free_attestation.validator_index,
|
||||
&free_attestation.data.beacon_block_root,
|
||||
&self.spec,
|
||||
)?;
|
||||
Ok(aggregation_outcome)
|
||||
}
|
||||
@@ -486,7 +487,9 @@ where
|
||||
self.state_store.put(&state_root, &ssz_encode(&state)[..])?;
|
||||
|
||||
// run the fork_choice add_block logic
|
||||
self.fork_choice.write().add_block(&block, &block_root)?;
|
||||
self.fork_choice
|
||||
.write()
|
||||
.add_block(&block, &block_root, &self.spec)?;
|
||||
|
||||
// If the parent block was the parent_block, automatically update the canonical head.
|
||||
//
|
||||
@@ -575,7 +578,10 @@ where
|
||||
pub fn fork_choice(&self) -> Result<(), Error> {
|
||||
let present_head = self.finalized_head().beacon_block_root;
|
||||
|
||||
let new_head = self.fork_choice.write().find_head(&present_head)?;
|
||||
let new_head = self
|
||||
.fork_choice
|
||||
.write()
|
||||
.find_head(&present_head, &self.spec)?;
|
||||
|
||||
if new_head != present_head {
|
||||
let block = self
|
||||
|
||||
@@ -5,4 +5,4 @@ mod checkpoint;
|
||||
|
||||
pub use self::beacon_chain::{BeaconChain, Error};
|
||||
pub use self::checkpoint::CheckPoint;
|
||||
pub use fork_choice::{ForkChoice, ForkChoiceAlgorithms, ForkChoiceError};
|
||||
pub use fork_choice::{ForkChoice, ForkChoiceAlgorithm, ForkChoiceError};
|
||||
|
||||
Reference in New Issue
Block a user