js-waku/packages/utils
Danish Arora 6f09fbf4ed
feat: use the lowest latency peer for protocols (#1540)
* 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
2023-09-08 21:36:55 +05:30
..
src feat: use the lowest latency peer for protocols (#1540) 2023-09-08 21:36:55 +05:30
.eslintrc.cjs chore: upgrade libp2p and related deps (#1482) 2023-08-16 20:18:13 +05:30
CHANGELOG.md chore: release master (#1444) 2023-08-02 13:02:57 +02:00
package.json chore(deps)(deps-dev): bump rollup from 3.28.0 to 3.29.0 (#1545) 2023-09-08 00:12:39 +05:30
rollup.config.js chore: upgrade libp2p and related deps (#1482) 2023-08-16 20:18:13 +05:30
tsconfig.dev.json chore: move libp2p and byte utils to a single `utils` package (#1149) 2023-02-06 11:22:36 +05:30
tsconfig.json chore: move libp2p and byte utils to a single `utils` package (#1149) 2023-02-06 11:22:36 +05:30