issues
search
LiskArchive
/
lisk-engine
:bullettrain_front: Lisk blockchain engine
https://lisk.com
Apache License 2.0
0
stars
0
forks
source link
Improve managing connections to peers
#89
Closed
matjazv
closed
1 year ago
matjazv
commented
1 year ago
What was the problem?
This PR resolves #63.
How was it solved?
If the number of connections exceeds the maximum allowed number of connections, some of those connections are terminated.
If the number of connections drops below the minimum number of connections,
p2p
tries to connect to some of the known peers.
To prevent an indefinite amount of time to be connected with any of non-fixed peers, connections are randomly closed at predefined time intervals.
Some unit tests were refactored to not use busy wait anymore.
How was it tested?
New unit test was implemented.
Existing and new unit tests passed.
What was the problem?
This PR resolves #63.
How was it solved?
p2p
tries to connect to some of the known peers.How was it tested?