Fix misleading log

pull/148/head
gmbnt 5 years ago
parent f7fc92cc0a
commit 9b5c419aaa

@ -126,7 +126,7 @@ internal enum OnionRequestAPI {
/// ///
/// - Note: Exposed for testing purposes. /// - Note: Exposed for testing purposes.
internal static func getPath(excluding snode: LokiAPITarget) -> Promise<Path> { internal static func getPath(excluding snode: LokiAPITarget) -> Promise<Path> {
guard pathSize >= 1 else { preconditionFailure("Cannot build path of size zero.") } guard pathSize >= 1 else { preconditionFailure("Can't build path of size zero.") }
// randomElement() uses the system's default random generator, which is cryptographically secure // randomElement() uses the system's default random generator, which is cryptographically secure
if paths.count >= pathCount { if paths.count >= pathCount {
return Promise<Path> { seal in return Promise<Path> { seal in

@ -24,7 +24,7 @@ class OnionRequestAPITests : XCTestCase {
failureCount += 1 failureCount += 1
seal.reject(error) seal.reject(error)
}.finally(on: OnionRequestAPI.workQueue) { }.finally(on: OnionRequestAPI.workQueue) {
print("[Loki] [Onion Request API] Success rate: \(successCount)/\(failureCount).") print("[Loki] [Onion Request API] Successes/Failures: \(successCount)/\(failureCount).")
} }
return promise return promise
} }

Loading…
Cancel
Save