Skip to content

Commit 7037c01

Browse files
committed
f: document InitSyncTracker
1 parent c702ef9 commit 7037c01

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,18 @@ impl fmt::Display for PeerHandleError {
509509
}
510510
}
511511

512+
/// Internal struct for keeping track of the gossip syncing progress with a given peer
512513
enum InitSyncTracker{
514+
/// Only sync ad-hoc gossip as it comes in, do not send historical gossip.
515+
/// Upon receipt of a GossipTimestampFilter message, this is the default initial state if the
516+
/// contained timestamp is less than 6 hours old.
513517
NoSyncRequested,
518+
/// Send historical gossip starting at the given channel id, which gets incremented as the
519+
/// gossiping progresses.
520+
/// Upon receipt of a GossipTimestampFilter message, this is the default initial state if the
521+
/// contained timestamp is at least 6 hours old, and the initial channel id is set to 0.
514522
ChannelsSyncing(u64),
523+
/// Upon completion of channel syncing, the node gossip is synced.
515524
NodesSyncing(NodeId),
516525
}
517526

0 commit comments

Comments
 (0)