Skip to content

Commit 428482d

Browse files
committed
Only expose stale RGS age limit with std outside of tests
1 parent 3f5fcfe commit 428482d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning-rapid-gossip-sync/src/processing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use lightning::io;
1616
use crate::error::GraphSyncError;
1717
use crate::RapidGossipSync;
1818

19-
#[cfg(feature = "std")]
19+
#[cfg(all(feature = "std", not(test), not(feature = "_test_utils")))]
2020
use std::time::{SystemTime, UNIX_EPOCH};
2121

2222
#[cfg(not(feature = "std"))]
@@ -34,7 +34,7 @@ const MAX_INITIAL_NODE_ID_VECTOR_CAPACITY: u32 = 50_000;
3434

3535
/// We remove disallow gossip data that's more than two weeks old, per BOLT 7's
3636
/// suggestion.
37-
#[cfg(feature = "std")]
37+
#[cfg(all(feature = "std", not(test), not(feature = "_test_utils")))]
3838
const STALE_RGS_UPDATE_AGE_LIMIT_SECS: u64 = 60 * 60 * 24 * 14;
3939

4040
impl<NG: Deref<Target=NetworkGraph<L>>, L: Deref> RapidGossipSync<NG, L> where L::Target: Logger {

0 commit comments

Comments
 (0)