aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/kademlia_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-171-6/+6
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-121-6/+6
|
* swarm/network: Saturation check for healthy networks (#19071)holisticode2019-02-191-15/+111
| | | | | | | | | | | | | | | | | | | | | | * swarm/network: new saturation for implementation * swarm/network: re-added saturation func in Kademlia as it is used elsewhere * swarm/network: saturation with higher MinBinSize * swarm/network: PeersPerBin with depth check * swarm/network: edited tests to pass new saturated check * swarm/network: minor fix saturated check * swarm/network/simulations/discovery: fixed renamed RPC call * swarm/network: renamed to isSaturated and returns bool * swarm/network: early depth check (cherry picked from commit 2af24724dd5f3ab1994001854eb32c6a19f9f64a)
* swarm/network: rewrite of peer suggestion engine, fix skipped tests (#18404)Viktor Trón2019-02-191-573/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * swarm/network: fix skipped tests related to suggestPeer * swarm/network: rename depth to radius * swarm/network: uncomment assertHealth and improve comments * swarm/network: remove commented code * swarm/network: kademlia suggestPeer algo correction * swarm/network: kademlia suggest peer * simplify suggest Peer code * improve peer suggestion algo * add comments * kademlia testing improvements * assertHealth -> checkHealth (test helper) * testSuggestPeer -> checkSuggestPeer (test helper) * remove testSuggestPeerBug and TestKademliaCase * swarm/network: kademlia suggestPeer cleanup, improved comments * swarm/network: minor comment, discovery test default arg (cherry picked from commit bcb2594151c849d65108dd94e54b69067d117d7d)
* Stream subscriptions (#18355)holisticode2019-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * swarm/network: eachBin now starts at kaddepth for nn * swarm/network: fix Kademlia.EachBin * swarm/network: fix kademlia.EachBin * swarm/network: correct EachBin implementation according to requirements * swarm/network: less addresses simplified tests * swarm: calc kad depth outside loop in EachBin test * swarm/network: removed printResults * swarm/network: cleanup imports * swarm/network: remove kademlia.EachBin; fix RequestSubscriptions and add unit test * swarm/network/stream: address PR comments * swarm/network/stream: package-wide subscriptionFunc * swarm/network/stream: refactor to kad.EachConn
* swarm/network: Rename minproxbinsize, add as member of simulation (#18408)lash2019-01-101-10/+10
| | | | | | * swarm/network: Rename minproxbinsize, add as member of simulation * swarm/network: Deactivate WaitTillHealthy, unreliable pending suggestpeer
* swarm/network: remove isproxbin bool from kad.Each* iterfunc (#18239)Viktor Trón2019-01-101-1/+1
| | | | | | * swarm/network, swarm/pss: remove isproxbin bool from kad.Each* iterfunc * swarm/network: restore comment and unskip snapshot sync tests
* swarm/network: Revised depth and health for Kademlia (#18354)lash2018-12-221-69/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * swarm/network: Revised depth calculation with tests * swarm/network: WIP remove redundant "full" function * swarm/network: WIP peerpot refactor * swarm/network: Make test methods submethod of peerpot and embed kad * swarm/network: Remove commented out code * swarm/network: Rename health test functions * swarm/network: Too many n's * swarm/network: Change hive Healthy func to accept addresses * swarm/network: Add Healthy proxy method for api in hive * swarm/network: Skip failing test out of scope for PR * swarm/network: Skip all tests dependent on SuggestPeers * swarm/network: Remove commented code and useless kad Pof member * swarm/network: Remove more unused code, add counter on depth test errors * swarm/network: WIP Create Healthy assertion tests * swarm/network: Roll back health related methods receiver change * swarm/network: Hardwire network minproxbinsize in swarm sim * swarm/network: Rework Health test to strict Pending add test for saturation And add test for as many as possible up to saturation * swarm/network: Skip discovery tests (dependent on SuggestPeer) * swarm/network: Remove useless minProxBinSize in stream * swarm/network: Remove unnecessary testing.T param to assert health * swarm/network: Implement t.Helper() in checkHealth * swarm/network: Rename check back to assert now that we have helper magic * swarm/network: Revert WaitTillHealthy change (deferred to nxt PR) * swarm/network: Kademlia tests GotNN => ConnectNN * swarm/network: Renames and comments * swarm/network: Add comments
* swarm/network: Correct neighborhood depth (#18066)lash2018-11-271-1/+88
|
* swarm/network: light nodes are not dialed, saved and requested from (#17975)Mark Vujevits2018-11-081-4/+54
| | | | | | | | | | | | | | | | * RequestFromPeers does not use peers marked as lightnode * fix warning about variable name * write tests for RequestFromPeers * lightnodes should be omitted from the addressbook * resolve pr comments regarding logging, formatting and comments * resolve pr comments regarding comments and added a missing newline * add assertions to check peers in live connections
* Kademlia refactor (#17641)Viktor Trón2018-09-121-105/+78
| | | | | | | | * swarm/network: simplify kademlia/hive; rid interfaces * swarm, swarm/network/stream, swarm/netork/simulations,, swarm/pss: adapt to new Kad API * swarm/network: minor changes re review; add missing lock to NeighbourhoodDepthC
* swarm: network rewrite mergeethersphere2018-06-221-0/+623