Skip to content
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

swarm/network: Revised depth and health for Kademlia #18354

Merged
merged 26 commits into from
Dec 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
75495e5
swarm/network: Revised depth calculation with tests
nolash Dec 12, 2018
8f970c4
swarm/network: WIP remove redundant "full" function
nolash Dec 12, 2018
6652f57
swarm/network: WIP peerpot refactor
nolash Dec 14, 2018
dc64dda
swarm/network: Make test methods submethod of peerpot and embed kad
nolash Dec 14, 2018
957c8cc
swarm/network: Remove commented out code
nolash Dec 14, 2018
af9b98c
swarm/network: Rename health test functions
nolash Dec 14, 2018
5bf8307
swarm/network: Too many n's
nolash Dec 14, 2018
166f084
swarm/network: Change hive Healthy func to accept addresses
nolash Dec 17, 2018
e41cf54
swarm/network: Add Healthy proxy method for api in hive
nolash Dec 17, 2018
13a0e6a
swarm/network: Skip failing test out of scope for PR
nolash Dec 17, 2018
31807b2
swarm/network: Skip all tests dependent on SuggestPeers
nolash Dec 17, 2018
e665380
swarm/network: Remove commented code and useless kad Pof member
nolash Dec 17, 2018
2990503
swarm/network: Remove more unused code, add counter on depth test errors
nolash Dec 17, 2018
cbf6d77
swarm/network: WIP Create Healthy assertion tests
nolash Dec 17, 2018
eec6ba7
swarm/network: Roll back health related methods receiver change
nolash Dec 17, 2018
89e7259
swarm/network: Hardwire network minproxbinsize in swarm sim
nolash Dec 17, 2018
bdcca4c
swarm/network: Rework Health test to strict
nolash Dec 17, 2018
f5b6fd9
swarm/network: Skip discovery tests (dependent on SuggestPeer)
nolash Dec 17, 2018
f295834
swarm/network: Remove useless minProxBinSize in stream
nolash Dec 18, 2018
6a815a9
swarm/network: Remove unnecessary testing.T param to assert health
nolash Dec 19, 2018
78905f5
swarm/network: Implement t.Helper() in checkHealth
nolash Dec 19, 2018
a5953f6
swarm/network: Rename check back to assert now that we have helper magic
nolash Dec 19, 2018
89ea2fe
swarm/network: Revert WaitTillHealthy change (deferred to nxt PR)
nolash Dec 20, 2018
04a3cff
swarm/network: Kademlia tests GotNN => ConnectNN
nolash Dec 20, 2018
d45b0c4
swarm/network: Renames and comments
nolash Dec 20, 2018
412b02f
swarm/network: Add comments
nolash Dec 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion swarm/network/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (d *Peer) handleSubPeersMsg(msg *subPeersMsg) error {
d.setDepth(msg.Depth)
var peers []*BzzAddr
d.kad.EachConn(d.Over(), 255, func(p *Peer, po int, isproxbin bool) bool {
if pob, _ := pof(d, d.kad.BaseAddr(), 0); pob > po {
if pob, _ := Pof(d, d.kad.BaseAddr(), 0); pob > po {
return false
}
if !d.seen(p.BzzAddr) {
Expand Down
Loading