refactor things the router owns (dht, sessions, searches) into that struct, to make the ownership more explicit

This commit is contained in:
Arceliar 2019-08-23 20:26:15 -05:00
parent bbcbbaf3b1
commit 9835c63818
9 changed files with 59 additions and 59 deletions

View file

@ -172,7 +172,7 @@ func (m *nodeinfo) sendNodeInfo(key crypto.BoxPubKey, coords []byte, isResponse
NodeInfo: m.getNodeInfo(),
}
bs := nodeinfo.encode()
shared := m.core.sessions.getSharedKey(&m.core.boxPriv, &key)
shared := m.core.router.sessions.getSharedKey(&m.core.boxPriv, &key)
payload, nonce := crypto.BoxSeal(shared, bs, nil)
p := wire_protoTrafficPacket{
Coords: coords,