-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/broadcast-trees #89
base: master
Are you sure you want to change the base?
Changes from 18 commits
8f98000
75fc828
2a3b7b1
7584bdc
0b12ff2
526cbe4
4cd09ba
d80d866
4664f0b
fedabb3
be28094
46f4664
71b5762
1827ccf
ad96b2b
f182c71
ae1c4d2
4a33456
3e7b35e
ce8a113
292f5a6
61be6d6
e3ac2f7
fbea663
6ab67dd
506e3e7
61bdfe6
0dca0f8
6813cdf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,6 @@ identifier_name: | |
excluded: | ||
- id | ||
- to | ||
- i | ||
disabled_rules: | ||
- trailing_comma |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
CFPropertyList (3.0.1) | ||
activesupport (4.2.11.1) | ||
i18n (~> 0.7) | ||
minitest (~> 5.1) | ||
thread_safe (~> 0.3, >= 0.3.4) | ||
tzinfo (~> 1.1) | ||
algoliasearch (1.27.1) | ||
httpclient (~> 2.8, >= 2.8.3) | ||
json (>= 1.5.1) | ||
atomos (0.1.3) | ||
claide (1.0.3) | ||
cocoapods (1.8.4) | ||
activesupport (>= 4.0.2, < 5) | ||
claide (>= 1.0.2, < 2.0) | ||
cocoapods-core (= 1.8.4) | ||
cocoapods-deintegrate (>= 1.0.3, < 2.0) | ||
cocoapods-downloader (>= 1.2.2, < 2.0) | ||
cocoapods-plugins (>= 1.0.0, < 2.0) | ||
cocoapods-search (>= 1.0.0, < 2.0) | ||
cocoapods-stats (>= 1.0.0, < 2.0) | ||
cocoapods-trunk (>= 1.4.0, < 2.0) | ||
cocoapods-try (>= 1.1.0, < 2.0) | ||
colored2 (~> 3.1) | ||
escape (~> 0.0.4) | ||
fourflusher (>= 2.3.0, < 3.0) | ||
gh_inspector (~> 1.0) | ||
molinillo (~> 0.6.6) | ||
nap (~> 1.0) | ||
ruby-macho (~> 1.4) | ||
xcodeproj (>= 1.11.1, < 2.0) | ||
cocoapods-core (1.8.4) | ||
activesupport (>= 4.0.2, < 6) | ||
algoliasearch (~> 1.0) | ||
concurrent-ruby (~> 1.1) | ||
fuzzy_match (~> 2.0.4) | ||
nap (~> 1.0) | ||
cocoapods-deintegrate (1.0.4) | ||
cocoapods-downloader (1.2.2) | ||
cocoapods-plugins (1.0.0) | ||
nap | ||
cocoapods-search (1.0.0) | ||
cocoapods-stats (1.1.0) | ||
cocoapods-trunk (1.4.0) | ||
nap (>= 0.8, < 2.0) | ||
netrc (~> 0.11) | ||
cocoapods-try (1.1.0) | ||
colored2 (3.1.2) | ||
concurrent-ruby (1.1.6) | ||
escape (0.0.4) | ||
ffi (1.12.2) | ||
fourflusher (2.3.1) | ||
fuzzy_match (2.0.4) | ||
gh_inspector (1.1.3) | ||
httpclient (2.8.3) | ||
i18n (0.9.5) | ||
concurrent-ruby (~> 1.0) | ||
jazzy (0.11.1) | ||
cocoapods (~> 1.5) | ||
mustache (~> 1.1) | ||
open4 | ||
redcarpet (~> 3.4) | ||
rouge (>= 2.0.6, < 4.0) | ||
sassc (~> 2.1) | ||
sqlite3 (~> 1.3) | ||
xcinvoke (~> 0.3.0) | ||
json (2.2.0) | ||
liferaft (0.0.6) | ||
minitest (5.14.0) | ||
molinillo (0.6.6) | ||
mustache (1.1.0) | ||
nanaimo (0.2.6) | ||
nap (1.1.0) | ||
netrc (0.11.0) | ||
open4 (1.3.4) | ||
redcarpet (3.5.0) | ||
rouge (2.0.7) | ||
ruby-macho (1.4.0) | ||
sassc (2.2.1) | ||
ffi (~> 1.9) | ||
sqlite3 (1.4.1) | ||
thread_safe (0.3.6) | ||
tzinfo (1.2.6) | ||
thread_safe (~> 0.1) | ||
xcinvoke (0.3.0) | ||
liferaft (~> 0.0.6) | ||
xcodeproj (1.12.0) | ||
CFPropertyList (>= 2.3.3, < 4.0) | ||
atomos (~> 0.1.3) | ||
claide (>= 1.0.2, < 2.0) | ||
colored2 (~> 3.1) | ||
nanaimo (~> 0.2.6) | ||
xcpretty (0.3.0) | ||
rouge (~> 2.0.7) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
jazzy (= 0.11.1) | ||
xcpretty | ||
|
||
BUNDLED WITH | ||
2.1.4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Foundation | ||
|
||
extension Array where Element == Addr { | ||
|
||
func closest(to: Addr) -> Addr? { | ||
var distance = 0; | ||
var addr: Addr? | ||
|
||
forEach { peer in | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can just call Much more readable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh true |
||
let dist = peer.distance(to: to) | ||
if distance > dist { | ||
distance = dist | ||
addr = peer | ||
} | ||
} | ||
|
||
return addr | ||
} | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not have trailing semicolons.