Skip to content

Commit f6a9078

Browse files
committed
Document RGS timestamp usage.
1 parent 8da30df commit f6a9078

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lightning-rapid-gossip-sync/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ This crate exposes functionality for rapid gossip graph syncing, aimed primarily
44
Its server counterpart is the
55
[rapid-gossip-sync-server](https://github.com/lightningdevkit/rapid-gossip-sync-server) repository.
66

7+
## Usage
8+
9+
To kick off Rapid Gossip Sync from the beginning, retrieve a snapshot from an RGS server instance with the initial
10+
timestamp being 0.
11+
12+
Applying that snapshot using the `RapidGossipSync` instance will extract and retrieve the subsequent timestamp to
13+
request from the server instance. The methods `sync_network_graph_with_file_path`, `update_network_graph`, and
14+
`update_network_graph_no_std` all return a `Result<u32, GraphSyncError>`, and that `u32` success value
15+
is the timestamp meant to be used for the next server request.
16+
717
## Mechanism
818

919
The (presumed) server sends a compressed gossip response containing gossip data. The gossip data is

0 commit comments

Comments
 (0)