mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 21:27:12 +00:00
Update fork choice
This commit is contained in:
@@ -27,6 +27,7 @@ pub struct SszContainer {
|
||||
pub nodes: Vec<ProtoNodeV17>,
|
||||
pub indices: Vec<(Hash256, usize)>,
|
||||
pub previous_proposer_boost: ProposerBoost,
|
||||
pub unsatisfied_inclusion_list_block: Hash256,
|
||||
}
|
||||
|
||||
impl From<&ProtoArrayForkChoice> for SszContainer {
|
||||
@@ -42,6 +43,7 @@ impl From<&ProtoArrayForkChoice> for SszContainer {
|
||||
nodes: proto_array.nodes.clone(),
|
||||
indices: proto_array.indices.iter().map(|(k, v)| (*k, *v)).collect(),
|
||||
previous_proposer_boost: proto_array.previous_proposer_boost,
|
||||
unsatisfied_inclusion_list_block: proto_array.unsatisfied_inclusion_list_block,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,6 +58,7 @@ impl TryFrom<SszContainer> for ProtoArrayForkChoice {
|
||||
finalized_checkpoint: from.finalized_checkpoint,
|
||||
nodes: from.nodes,
|
||||
indices: from.indices.into_iter().collect::<HashMap<_, _>>(),
|
||||
unsatisfied_inclusion_list_block: from.unsatisfied_inclusion_list_block,
|
||||
previous_proposer_boost: from.previous_proposer_boost,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user