Compute roots for unfinalized by_range requests with fork-choice (#7098)

Includes PRs

- https://github.com/sigp/lighthouse/pull/7058
- https://github.com/sigp/lighthouse/pull/7066

Cleaner for the `release-v7.0.0` branch
This commit is contained in:
Lion - dapplion
2025-04-07 00:16:41 -03:00
committed by GitHub
parent 5dd998a616
commit d511ca0494
5 changed files with 209 additions and 197 deletions

View File

@@ -856,10 +856,18 @@ impl ProtoArrayForkChoice {
}
/// See `ProtoArray::iter_nodes`
pub fn iter_nodes<'a>(&'a self, block_root: &Hash256) -> Iter<'a> {
pub fn iter_nodes(&self, block_root: &Hash256) -> Iter {
self.proto_array.iter_nodes(block_root)
}
/// See `ProtoArray::iter_block_roots`
pub fn iter_block_roots(
&self,
block_root: &Hash256,
) -> impl Iterator<Item = (Hash256, Slot)> + use<'_> {
self.proto_array.iter_block_roots(block_root)
}
pub fn as_bytes(&self) -> Vec<u8> {
SszContainer::from(self).as_ssz_bytes()
}