Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-kbucket
Commits
fd04af92
Unverified
Commit
fd04af92
authored
Dec 13, 2019
by
Steven Allen
Committed by
GitHub
Dec 13, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #45 from aarshkshah1992/fix/nearest-bucket-doc
Fix NearestPeers Doc
parents
d5af829b
7f5ba9fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
table.go
table.go
+2
-2
No files found.
table.go
View file @
fd04af92
...
...
@@ -278,8 +278,8 @@ func (rt *RoutingTable) NearestPeers(id ID, count int) []peer.ID {
// do this bucket by bucket because each bucket will share 1 fewer bit
// than the last.
//
// * bucket cpl-1: cpl-
2
shared bits.
// * bucket cpl-2: cpl-
3
shared bits.
// * bucket cpl-1: cpl-
1
shared bits.
// * bucket cpl-2: cpl-
2
shared bits.
// ...
for
i
:=
cpl
-
1
;
i
>=
0
&&
pds
.
Len
()
<
count
;
i
--
{
pds
.
appendPeersFromList
(
rt
.
Buckets
[
i
]
.
list
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment