Skip to content

Commit

Permalink
trick with limit(0) to avoid getting stored events - improve also ban…
Browse files Browse the repository at this point in the history
…dwith requesting less events (#378)

Co-authored-by: Francisco Calderón <fjcalderon@gmail.com>
  • Loading branch information
arkanoider and grunch authored Nov 7, 2024
1 parent 53eb1e5 commit 8d45dd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ async fn main() -> Result<()> {
let my_keys = util::get_keys()?;
let subscription = Filter::new()
.pubkey(my_keys.public_key())
.since(Timestamp::now() - 172800);
.kind(Kind::GiftWrap)
.limit(0);

let client = match get_nostr_client() {
Ok(client) => client,
Expand Down

0 comments on commit 8d45dd6

Please sign in to comment.