Expand economy, autobase, network, observability, and scheduling modules.
Add auction withdraw/cancel, marketplace search helpers, update gossip history, autobase fork/lease/indexer/view APIs, link-probe and circuit-loom utilities, trace trees, pheromone ranking, and scheduling/measurement helpers with tests. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -35,3 +35,13 @@ test('getStats', async (t) => {
|
||||
t.is(m.getStats().allocated, 1)
|
||||
await m.close()
|
||||
})
|
||||
|
||||
test('canConsume totalRemaining', async (t) => {
|
||||
const m = new HyperP2PSlaBudget()
|
||||
m.allocate('a', 5)
|
||||
m.allocate('b', 3)
|
||||
t.ok(m.canConsume('a', 4))
|
||||
t.not(m.canConsume('a', 6))
|
||||
t.is(m.totalRemaining(), 8)
|
||||
await m.close()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user