From bd42a6da5b0a0e61abf0fb3e2f4825de51377888 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Fri, 7 Aug 2026 11:00:28 +0000
Subject: [PATCH] gossip-memory: update `NostrGossipMemory::unbounded` doc
Make it clear that it's not for production use.
Signed-off-by: Awiteb
---
gossip/nostr-gossip-memory/src/store.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gossip/nostr-gossip-memory/src/store.rs b/gossip/nostr-gossip-memory/src/store.rs
index 8438360e0..03ea266a1 100644
--- a/gossip/nostr-gossip-memory/src/store.rs
+++ b/gossip/nostr-gossip-memory/src/store.rs
@@ -54,7 +54,10 @@ pub struct NostrGossipMemory {
}
impl NostrGossipMemory {
- /// Construct a new **unbounded** instance
+ /// Creates an unbounded cache for testing or non-production use.
+ ///
+ /// Prefer [`NostrGossipMemory::bounded`] for production code to avoid
+ /// unbounded memory growth.
pub fn unbounded() -> Self {
Self {
public_keys: RwLock::new(LruCache::unbounded()),