Add batch helpers and domain utilities across modules missing Batch APIs.
Third enrichment pass: *Batch methods for agents, economy, consensus, core, messaging, network, observability, pear-platform, scheduling, storage, supercomputer, and time-ordering modules. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -433,6 +433,15 @@ class HyperP2PCausalConsensus extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
async proposeBatch (entries) {
|
||||
if (!Array.isArray(entries)) throw new Error('entries array required')
|
||||
const out = []
|
||||
for (const e of entries) {
|
||||
out.push(await this.propose(e.data, e.causalDeps || {}))
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
getMetrics () {
|
||||
return { ...this._metrics, peers: this.peers.size, pendingProposals: this.proposals.size - this.decidedOrders.size }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user