chore: expose methods and structs (#1607)

This commit is contained in:
Roman Krasiuk
2023-03-02 16:29:00 +02:00
committed by GitHub
parent 9326b45821
commit 6501ce2956
3 changed files with 15 additions and 9 deletions

View File

@@ -236,9 +236,12 @@ where
/// Represents a gap to sync: from `local_head` to `target`
#[derive(Debug)]
struct SyncGap {
local_head: SealedHeader,
target: SyncTarget,
pub struct SyncGap {
/// The local head block. Represents lower bound of sync range.
pub local_head: SealedHeader,
/// The sync target. Represents upper bound of sync range.
pub target: SyncTarget,
}
// === impl SyncGap ===
@@ -246,7 +249,7 @@ struct SyncGap {
impl SyncGap {
/// Returns `true` if the gap from the head to the target was closed
#[inline]
fn is_closed(&self) -> bool {
pub fn is_closed(&self) -> bool {
self.local_head.hash() == self.target.tip()
}
}