zebrad/components/sync/status/
mock.rs1#![allow(dead_code)]
5
6use crate::components::sync::RecentSyncLengths;
7
8use super::SyncStatus;
9
10impl SyncStatus {
12 pub(crate) fn sync_close_to_tip(recent_syncs: &mut RecentSyncLengths) {
15 for _ in 0..RecentSyncLengths::MAX_RECENT_LENGTHS {
16 recent_syncs.push_extend_tips_length(1);
17 }
18 }
19
20 pub(crate) fn sync_far_from_tip(recent_syncs: &mut RecentSyncLengths) {
23 for _ in 0..RecentSyncLengths::MAX_RECENT_LENGTHS {
24 recent_syncs.push_extend_tips_length(Self::MIN_DIST_FROM_TIP * 10);
25 }
26 }
27}