Dynamically adjust snapshot scopes.
[rapid-gossip-sync-server] / src / config.rs
index b1c7ba283e9f73fe7ac732cd76680891fb20a14d..b905c53f3b877f27b12e21d8fd816f9864a6a1a0 100644 (file)
@@ -16,7 +16,8 @@ use lightning_block_sync::http::HttpEndpoint;
 use tokio_postgres::Config;
 
 pub(crate) const SCHEMA_VERSION: i32 = 12;
-pub(crate) const SYMLINK_GRANULARITY_INTERVAL: u32 = 3600 * 3;
+pub(crate) const SYMLINK_GRANULARITY_INTERVAL: u32 = 3600 * 3; // three hours
+pub(crate) const MAX_SNAPSHOT_SCOPE: u32 = 3600 * 24 * 21; // three weeks
 // generate symlinks based on a 3-hour-granularity
 /// If the last update in either direction was more than six days ago, we send a reminder
 /// That reminder may be either in the form of a channel announcement, or in the form of empty