nostr-gossip-sqlite 0.45.0-alpha.2

Nostr SQLite gossip backend
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) 2022-2023 Yuki Kishimoto
// Copyright (c) 2023-2025 Rust Nostr Developers
// Distributed under the MIT software license

use std::time::Duration;

use nostr_gossip::flags::GossipFlags;

// TODO: make this configurable
pub(super) const TTL_OUTDATED: Duration = Duration::from_secs(24 * 60 * 60); // 24 hours

pub(super) const READ_WRITE_FLAGS: GossipFlags = {
    let mut flags = GossipFlags::READ;
    flags.add(GossipFlags::WRITE);
    flags
};

pub(super) const RELAYS_QUERY_LIMIT: u8 = 21;