summaryrefslogtreecommitdiff
path: root/app/sur
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-11-18 07:50:36 +0700
committerpolwex <polwex@sortug.com>2025-11-18 07:50:36 +0700
commitb3379cc108d6eed98cb0010e6f1ddca94aba83a2 (patch)
tree2bf107b5314318b20fb50b41a9625b19a49febed /app/sur
parent2497097f6cd639f9bfefec1d037a8c19a65e8145 (diff)
implemented proper handling of EOSE events and nostr request batching
Diffstat (limited to 'app/sur')
-rw-r--r--app/sur/nostr.hoon4
-rw-r--r--app/sur/nostrill.hoon1
2 files changed, 4 insertions, 1 deletions
diff --git a/app/sur/nostr.hoon b/app/sur/nostr.hoon
index 2f8296b..b363cb9 100644
--- a/app/sur/nostr.hoon
+++ b/app/sur/nostr.hoon
@@ -33,7 +33,9 @@ $: start=@da
reqs=(map sub-id event-stats)
==
+$ event-stats
- [filters=(list filter) received=event-count]
+ :: if not ongoing we kill the subscription on %eose
+ :: if chunked we trigger a new subscription on %eose
+ [filters=(list filter) received=event-count ongoing=? chunked=(list filter)]
+$ sub-id @t
+$ event-count @ud
diff --git a/app/sur/nostrill.hoon b/app/sur/nostrill.hoon
index 136547b..c06c20c 100644
--- a/app/sur/nostrill.hoon
+++ b/app/sur/nostrill.hoon
@@ -5,6 +5,7 @@
$: %0
:: nostr config
relays=(map @ud relay-stats:nostr) :: key is the websocket id
+ :: ws-msg-queue=(list websocket-event:eyre)
keys=(lest keys:nostr) :: cycled, i.keys is current one
:: own feed
feed=feed:trill