mirror of https://github.com/waku-org/nwaku.git
chore: saving agent and protoVersion in peerStore (#2860)
This commit is contained in:
parent
31c632e427
commit
cae0c7e378
|
@ -351,7 +351,7 @@ suite "Peer Manager":
|
|||
await server2.stop()
|
||||
|
||||
suite "Tracked Peer Metadata":
|
||||
xasyncTest "Metadata Recording":
|
||||
asyncTest "Metadata Recording":
|
||||
# When adding a peer other than self to the peer store
|
||||
serverRemotePeerInfo.enr = some(server.enr)
|
||||
client.peerManager.addPeer(serverRemotePeerInfo)
|
||||
|
|
|
@ -142,6 +142,8 @@ proc addPeer*(pm: PeerManager, remotePeerInfo: RemotePeerInfo, origin = UnknownO
|
|||
pm.peerStore[AddressBook][remotePeerInfo.peerId] = remotePeerInfo.addrs
|
||||
pm.peerStore[KeyBook][remotePeerInfo.peerId] = remotePeerInfo.publicKey
|
||||
pm.peerStore[SourceBook][remotePeerInfo.peerId] = origin
|
||||
pm.peerStore[ProtoVersionBook][remotePeerInfo.peerId] = remotePeerInfo.protoVersion
|
||||
pm.peerStore[AgentBook][remotePeerInfo.peerId] = remotePeerInfo.agent
|
||||
|
||||
if remotePeerInfo.protocols.len > 0:
|
||||
pm.peerStore[ProtoBook][remotePeerInfo.peerId] = remotePeerInfo.protocols
|
||||
|
|
Loading…
Reference in New Issue