relay: split descriptors to {our,all}_descriptors

Now that we have ephemeral relays, we don't want them used everywhere
This commit is contained in:
William Casarin
2023-05-10 12:20:33 -07:00
parent 1367be0d10
commit fe6d7e5118
10 changed files with 17 additions and 13 deletions

View File

@@ -739,7 +739,7 @@ func find_event(state: DamusState, evid: String, search_type: SearchType, find_f
case .eose:
if !has_event {
attempts += 1
if attempts == state.pool.descriptors.count / 2 {
if attempts == state.pool.our_descriptors.count / 2 {
callback(nil)
}
state.pool.unsubscribe(sub_id: subid, to: [relay_id])