aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/stream/snapshot_sync_test.go
diff options
context:
space:
mode:
authorViktor TrĂ³n <viktor.tron@gmail.com>2018-09-12 17:24:56 +0800
committerBalint Gabor <balint.g@gmail.com>2018-09-12 17:24:56 +0800
commitbfce00385f1c8dab222b7ddab6c336177a5ae731 (patch)
tree8b3d2b2ce30e8b5eaf6db5b89a6c5570c3997cff /swarm/network/stream/snapshot_sync_test.go
parentb06ff563a1f1095407612e04a1707e13d2dc20da (diff)
downloaddexon-bfce00385f1c8dab222b7ddab6c336177a5ae731.tar.gz
dexon-bfce00385f1c8dab222b7ddab6c336177a5ae731.tar.zst
dexon-bfce00385f1c8dab222b7ddab6c336177a5ae731.zip
Kademlia refactor (#17641)
* 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
Diffstat (limited to 'swarm/network/stream/snapshot_sync_test.go')
-rw-r--r--swarm/network/stream/snapshot_sync_test.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/swarm/network/stream/snapshot_sync_test.go b/swarm/network/stream/snapshot_sync_test.go
index 4e1ab09fc..313019d6a 100644
--- a/swarm/network/stream/snapshot_sync_test.go
+++ b/swarm/network/stream/snapshot_sync_test.go
@@ -457,15 +457,10 @@ func testSyncingViaDirectSubscribe(chunkCount int, nodeCount int) error {
//returns the number of subscriptions requested
func startSyncing(r *Registry, conf *synctestConfig) (int, error) {
var err error
-
- kad, ok := r.delivery.overlay.(*network.Kademlia)
- if !ok {
- return 0, fmt.Errorf("Not a Kademlia!")
- }
-
+ kad := r.delivery.kad
subCnt := 0
//iterate over each bin and solicit needed subscription to bins
- kad.EachBin(r.addr.Over(), pof, 0, func(conn network.OverlayConn, po int) bool {
+ kad.EachBin(r.addr.Over(), pof, 0, func(conn *network.Peer, po int) bool {
//identify begin and start index of the bin(s) we want to subscribe to
histRange := &Range{}