Closed jondubois closed 5 years ago
@jondubois Also, it's failing on Jenkins with
@liskhq/lisk-p2p: test/unit/peer_discovery.ts(54,52): error TS2345: Argument of type 'P2PPeerInfo[]' is not assignable to parameter of type 'ReadonlyArray<P2PDiscoveredPeerInfo>'.
@liskhq/lisk-p2p: Property 'version' is missing in type 'P2PPeerInfo' but required in type 'P2PDiscoveredPeerInfo'.
What was the problem?
How did I fix it?
ackTimeout
to allow the user to specify an upper bound on how long it should take to perform requests (including discovery).EDIT (after PR feedback)
isDiscoveredPeer
property is now compulsory on theP2PDiscoveredPeerInfo
interface because we need to always differentiate between these two objects internally.peer.fetchStatus()
'status' call after connecting on the outbound connection; we need to make this call in order to get the fullP2PDiscoveredPeerInfo
from the outbound connection._triedPeers
to be of typeMap<string, P2PDiscoveredPeerInfo>
(only the full discovered peers info is allowed); we should not have undiscovered peers in there as it will cause issues in other parts of the logic._triedPeers
is now populated using a new event on thePeerPool
calledEVENT_DISCOVERED_PEER
; this event carries the fullP2PDiscoveredPeerInfo
How to test it?
npm run test:integration
Review checklist