Skip to content

Commit b8d2a8c

Browse files
committed
add is descendant to fork-choice
1 parent 72ef42b commit b8d2a8c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

consensus/fork_choice/src/fork_choice.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,11 @@ where
12551255
.is_finalized_checkpoint_or_descendant::<E>(block_root)
12561256
}
12571257

1258+
pub fn is_descendant(&self, ancestor_root: Hash256, descendant_root: Hash256) -> bool {
1259+
self.proto_array
1260+
.is_descendant(ancestor_root, descendant_root)
1261+
}
1262+
12581263
/// Returns `Ok(true)` if `block_root` has been imported optimistically or deemed invalid.
12591264
///
12601265
/// Returns `Ok(false)` if `block_root`'s execution payload has been elected as fully VALID, if

0 commit comments

Comments
 (0)