Implement initial negentropy base functions

This implements some useful functions to use negentropy from RelayPool,
but does not integrate them with the rest of the app.

No changelog for the negentropy support right now as it is not hooked up
to any user-facing feature

Changelog-Fixed: Fixed a race condition in the networking logic that could cause notes to get missed in certain rare scenarios
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2026-01-12 12:47:06 -08:00
parent ac05b83772
commit 95d38fa802
14 changed files with 1034 additions and 24 deletions

View File

@@ -207,6 +207,10 @@ enum NScriptEventType: Int {
self = .ok
case .auth:
self = .auth
case .negentropyError:
self = .notice // Treat negentropy errors as notices for nostrscript
case .negentropyMessage:
self = .notice // Treat negentropy messages as notices for nostrscript
}
}
}