feat(supercomputer,experimental): expand thermal, RAM, disk, paradox APIs
Thermal hottest peer and sample clear, RAM pool reset, disk stripe missing shards, paradox clock/merge helpers, mycelium top donors. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -84,6 +84,17 @@ class HyperP2PMyceliumPool extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
topDonors (n = 5) {
|
||||
return [...this._balances.entries()]
|
||||
.sort((a, b) => b[1] - a[1])
|
||||
.slice(0, n)
|
||||
.map(([peerId, balance]) => ({ peerId, balance }))
|
||||
}
|
||||
|
||||
resetPeer (peerId) {
|
||||
return this._balances.delete(this._pid(peerId))
|
||||
}
|
||||
|
||||
async ready () {
|
||||
if (this.swarm || !this.topic) return this
|
||||
await initModuleSwarm(this, {
|
||||
|
||||
Reference in New Issue
Block a user