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:
William Casarin
2023-06-30 06:41:30 -07:00
parent 3e3b689647
commit 5bac6405b9

View File

@@ -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 {