blocks: pass keypair instead of privkey to avoid pubkey gen

Generating a pubkey is quite slow, so pass a keypair instead of privkey
This commit is contained in:
William Casarin
2023-08-28 11:46:03 -07:00
parent 8e92e28faf
commit c71b0ee916
24 changed files with 108 additions and 107 deletions

View File

@@ -28,7 +28,7 @@ class SearchModel: ObservableObject {
func filter_muted() {
self.events.filter {
should_show_event(privkey: state.keypair.privkey, hellthreads: state.muted_threads, contacts: state.contacts, ev: $0)
should_show_event(keypair: state.keypair, hellthreads: state.muted_threads, contacts: state.contacts, ev: $0)
}
self.objectWillChange.send()
}
@@ -57,7 +57,7 @@ class SearchModel: ObservableObject {
return
}
guard should_show_event(privkey: state.keypair.privkey, hellthreads: state.muted_threads, contacts: state.contacts, ev: ev) else {
guard should_show_event(keypair: state.keypair, hellthreads: state.muted_threads, contacts: state.contacts, ev: ev) else {
return
}