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:
@@ -752,7 +752,7 @@ func guard_valid_event(events: EventCache, ev: NostrEvent, callback: @escaping (
|
|||||||
|
|
||||||
switch validated {
|
switch validated {
|
||||||
case .unknown:
|
case .unknown:
|
||||||
Task {
|
Task.detached(priority: .medium) {
|
||||||
let result = validate_event(ev: ev)
|
let result = validate_event(ev: ev)
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|||||||
Reference in New Issue
Block a user