These are chat archives for ethersphere/orange-lounge

24th
Feb 2018
holisticode
@holisticode
Feb 24 00:58
@zelig we may need to do some joint session again
Implemented bin-wise subscriptions like this:
   for j := 0; j < len(ids); j++ {
       overlays[ids[j]].EachAddr(nil, 0, func(addr network.OverlayAddr, po int, nn bool) bool {  //overlay is the kad table as from network.NewKademlia() in service creation
        peerId := conf.addrToIdMap[string(addr.Address())]
        client.CallContext(ctx, nil, "stream_startSyncing", peerId, po, nn) 
        return true
      }) 
    }
and StartSyncing:
func (r *TestExternalRegistry) StartSyncing(ctx context.Context, peerId discover.NodeID, po uint8, nn bool) {
  lastPO := po
  if nn {
    lastPO = maxPO
  }

  for i := po; i <= lastPO; i++ {
    r.Subscribe(peerId, "SYNC", []byte{i}, 0, 0, Top, false)
  }
}
holisticode
@holisticode
Feb 24 01:04
Debugging shows that quite a lot of bins get subscribed to each other, but tests still fail with chunks not there where expected