validation: make sure to run on a detached task
so we don't do sig validation on the main thread accidentally
This commit is contained in:
1 parent
3e3b689647
commit
5bac6405b9
1 file changed
+1
-1
@@ -752,7 +752,7 @@ func guard_valid_event(events: EventCache, ev: NostrEvent, callback: @escaping (
|
||||
|
||||
switch validated {
|
||||
case .unknown:
|
||||
Task {
|
||||
Task.detached(priority: .medium) {
|
||||
let result = validate_event(ev: ev)
|
||||
|
||||
DispatchQueue.main.async {
|
||||
|
||||
Reference in new issue
Block a user