@@ -15,7 +15,7 @@ protocol MultihopDecisionFlow {
1515 func pick(
1616 entryCandidates: [ RelayCandidate ] ,
1717 exitCandidates: [ RelayCandidate ] ,
18- selectCloseRelay : Bool
18+ selectNearbyLocation : Bool
1919 ) throws -> SelectedRelays
2020}
2121
@@ -31,7 +31,7 @@ struct OneToOne: MultihopDecisionFlow {
3131 func pick(
3232 entryCandidates: [ RelayCandidate ] ,
3333 exitCandidates: [ RelayCandidate ] ,
34- selectCloseRelay : Bool
34+ selectNearbyLocation : Bool
3535 ) throws -> SelectedRelays {
3636 guard canHandle ( entryCandidates: entryCandidates, exitCandidates: exitCandidates) else {
3737 guard let next else {
@@ -40,7 +40,7 @@ struct OneToOne: MultihopDecisionFlow {
4040 return try next. pick (
4141 entryCandidates: entryCandidates,
4242 exitCandidates: exitCandidates,
43- selectCloseRelay : selectCloseRelay
43+ selectNearbyLocation : selectNearbyLocation
4444 )
4545 }
4646
@@ -51,7 +51,7 @@ struct OneToOne: MultihopDecisionFlow {
5151 let exitMatch = try relayPicker. findBestMatch ( from: exitCandidates, applyObfuscation: false )
5252 let entryMatch = try relayPicker. findBestMatch (
5353 from: entryCandidates,
54- closeTo: selectCloseRelay ? exitMatch. location : nil ,
54+ closeTo: selectNearbyLocation ? exitMatch. location : nil ,
5555 applyObfuscation: true ,
5656 forceV4: true ,
5757 )
@@ -80,7 +80,7 @@ struct OneToMany: MultihopDecisionFlow {
8080 func pick(
8181 entryCandidates: [ RelayCandidate ] ,
8282 exitCandidates: [ RelayCandidate ] ,
83- selectCloseRelay : Bool
83+ selectNearbyLocation : Bool
8484 ) throws -> SelectedRelays {
8585 guard let multihopPicker = relayPicker as? MultihopPicker else {
8686 fatalError ( " Could not cast picker to MultihopPicker " )
@@ -93,7 +93,7 @@ struct OneToMany: MultihopDecisionFlow {
9393 return try next. pick (
9494 entryCandidates: entryCandidates,
9595 exitCandidates: exitCandidates,
96- selectCloseRelay : selectCloseRelay
96+ selectNearbyLocation : selectNearbyLocation
9797 )
9898 }
9999
@@ -129,7 +129,7 @@ struct ManyToOne: MultihopDecisionFlow {
129129 func pick(
130130 entryCandidates: [ RelayCandidate ] ,
131131 exitCandidates: [ RelayCandidate ] ,
132- selectCloseRelay : Bool
132+ selectNearbyLocation : Bool
133133 ) throws -> SelectedRelays {
134134 guard let multihopPicker = relayPicker as? MultihopPicker else {
135135 fatalError ( " Could not cast picker to MultihopPicker " )
@@ -142,7 +142,7 @@ struct ManyToOne: MultihopDecisionFlow {
142142 return try next. pick (
143143 entryCandidates: entryCandidates,
144144 exitCandidates: exitCandidates,
145- selectCloseRelay : selectCloseRelay
145+ selectNearbyLocation : selectNearbyLocation
146146 )
147147 }
148148
@@ -154,7 +154,7 @@ struct ManyToOne: MultihopDecisionFlow {
154154 let entryMatch = try multihopPicker. exclude (
155155 relay: exitMatch,
156156 from: entryCandidates,
157- closeTo: selectCloseRelay ? exitMatch. location : nil ,
157+ closeTo: selectNearbyLocation ? exitMatch. location : nil ,
158158 applyObfuscation: true
159159 )
160160
@@ -182,7 +182,7 @@ struct ManyToMany: MultihopDecisionFlow {
182182 func pick(
183183 entryCandidates: [ RelayCandidate ] ,
184184 exitCandidates: [ RelayCandidate ] ,
185- selectCloseRelay : Bool
185+ selectNearbyLocation : Bool
186186 ) throws -> SelectedRelays {
187187 guard let multihopPicker = relayPicker as? MultihopPicker else {
188188 fatalError ( " Could not cast picker to MultihopPicker " )
@@ -195,15 +195,15 @@ struct ManyToMany: MultihopDecisionFlow {
195195 return try next. pick (
196196 entryCandidates: entryCandidates,
197197 exitCandidates: exitCandidates,
198- selectCloseRelay : selectCloseRelay
198+ selectNearbyLocation : selectNearbyLocation
199199 )
200200 }
201201
202202 let exitMatch = try multihopPicker. findBestMatch ( from: exitCandidates, applyObfuscation: false , forceV4: true )
203203 let entryMatch = try multihopPicker. exclude (
204204 relay: exitMatch,
205205 from: entryCandidates,
206- closeTo: selectCloseRelay ? exitMatch. location : nil ,
206+ closeTo: selectNearbyLocation ? exitMatch. location : nil ,
207207 applyObfuscation: true
208208 )
209209
0 commit comments