mirror of
https://github.com/waku-org/js-waku.git
synced 2025-01-27 12:45:21 +00:00
6f09fbf4ed
* maintain pings in a hashmap * convert `KeepAliveManager` into a singleton * chore: fix an unrelated cyclic dependency error * update `selectPeerForProtocol` to return peer with the lowest latency * use the new KeepAliveManager API * use the new API for `selectPeerForProtocol` * add tests * use PeerData to hold the ping instead of a new variable * improve tests for readability * move back KeepAliveManager from singleton * reenable all tests * minor improvements * improve error handling * convert .then() syntax to async/await