diff options
author | Elad <theman@elad.im> | 2019-01-16 21:33:02 +0800 |
---|---|---|
committer | Rafael Matias <rafael@skyle.net> | 2019-02-19 19:54:56 +0800 |
commit | a3f31f51f38040e0aef76f4da95ae462fb649f81 (patch) | |
tree | 83463e8403270e1803d23609ac5a4ff2ccf61d6f /swarm/network/kademlia.go | |
parent | e63995b3f36837b97330a7ccaf56277099904d26 (diff) | |
download | dexon-a3f31f51f38040e0aef76f4da95ae462fb649f81.tar dexon-a3f31f51f38040e0aef76f4da95ae462fb649f81.tar.gz dexon-a3f31f51f38040e0aef76f4da95ae462fb649f81.tar.bz2 dexon-a3f31f51f38040e0aef76f4da95ae462fb649f81.tar.lz dexon-a3f31f51f38040e0aef76f4da95ae462fb649f81.tar.xz dexon-a3f31f51f38040e0aef76f4da95ae462fb649f81.tar.zst dexon-a3f31f51f38040e0aef76f4da95ae462fb649f81.zip |
cmd/swarm/swarm-snapshot: swarm snapshot generator (#18453)
* cmd/swarm/swarm-snapshot: add binary to create network snapshots
* cmd/swarm/swarm-snapshot: refactor and extend tests
* p2p/simulations: remove unused triggerChecks func and fix linter
* internal/cmdtest: raise the timeout for killing TestCmd
* cmd/swarm/swarm-snapshot: add more comments and other minor adjustments
* cmd/swarm/swarm-snapshot: remove redundant check in createSnapshot
* cmd/swarm/swarm-snapshot: change comment wording
* p2p/simulations: revert Simulation.Run from master
https://github.com/ethersphere/go-ethereum/pull/1077/files#r247078904
* cmd/swarm/swarm-snapshot: address pr comments
* swarm/network/simulations/discovery: removed snapshot write to file
* cmd/swarm/swarm-snapshot, swarm/network/simulations: removed redundant connection event check, fixed lint error
(cherry picked from commit 34f11e752f61b81c13cdde0649a3c7b14f801c69)
Diffstat (limited to 'swarm/network/kademlia.go')
-rw-r--r-- | swarm/network/kademlia.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/swarm/network/kademlia.go b/swarm/network/kademlia.go index 7d52f26f7..da99287f1 100644 --- a/swarm/network/kademlia.go +++ b/swarm/network/kademlia.go @@ -640,6 +640,8 @@ func (k *Kademlia) saturation() int { }) // TODO evaluate whether this check cannot just as well be done within the eachbin depth := depthForPot(k.conns, k.NeighbourhoodSize, k.base) + + // if in the iterator above we iterated deeper than the neighbourhood depth - return depth if depth < prev { return depth } |