Expand network, consensus, observability, storage, and pear modules
Add manual helpers across connection pool release/close, health probe clear and peer listing, quorum and distributed lock bulk operations, session rotation revoke-all, reputation peer reset, flow shaper flush, circuit breaker reset-all, RPC unregister and pending count, seeder registry topic management, activity queue clear, semantic vector remove, core priority fetch pending clear, trust gate untrust-all, and process spawn kill-all. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -301,6 +301,17 @@ class HyperP2PReputationSystem extends EventEmitter {
|
||||
return sorted
|
||||
}
|
||||
|
||||
peerIds () {
|
||||
return [...this.scores.keys()]
|
||||
}
|
||||
|
||||
resetPeer (peerId) {
|
||||
const targetHex = typeof peerId === 'string' ? peerId : b4a.toString(peerId, 'hex')
|
||||
const hadScore = this.scores.delete(targetHex)
|
||||
const hadHistory = this.history.delete(targetHex)
|
||||
return hadScore || hadHistory
|
||||
}
|
||||
|
||||
getHistory (peerId, limit = 50) {
|
||||
this.metrics.queries++
|
||||
const targetHex = typeof peerId === 'string' ? peerId : b4a.toString(peerId, 'hex')
|
||||
|
||||
@@ -73,6 +73,16 @@ class HyperP2PSessionRotation extends EventEmitter {
|
||||
return out
|
||||
}
|
||||
|
||||
sessionIds () {
|
||||
return [...this._sessions.keys()]
|
||||
}
|
||||
|
||||
revokeAll () {
|
||||
const ids = this.sessionIds()
|
||||
for (const id of ids) this.revokeSession(id)
|
||||
return ids.length
|
||||
}
|
||||
|
||||
_gossip (data) {
|
||||
if (!this._peerMsgs) return
|
||||
gossipSend(this, data)
|
||||
|
||||
Reference in New Issue
Block a user