Expand messaging, network, consensus, and platform module APIs.
Add batch helpers, clear utilities, and count methods for qos topics, brokers, probes, leases, locks, and registry modules. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -60,6 +60,11 @@ class HyperP2POverlayTopology extends EventEmitter {
|
||||
return n
|
||||
}
|
||||
|
||||
addNeighborBatch (entries) {
|
||||
if (!Array.isArray(entries)) throw new Error('entries array required')
|
||||
return entries.map((e) => this.addNeighbor(e.peerId, e.weight))
|
||||
}
|
||||
|
||||
lightestNeighbor () {
|
||||
let best = null
|
||||
for (const n of this._neighbors.values()) {
|
||||
|
||||
Reference in New Issue
Block a user