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:
@@ -37,3 +37,16 @@ test('getStats', async (t) => {
|
||||
t.is(m.getStats().opened, 1)
|
||||
await m.close()
|
||||
})
|
||||
|
||||
test('withdraw cancel highest', async (t) => {
|
||||
const m = new HyperP2PAuctionGossip()
|
||||
m.openAuction('a1')
|
||||
m.placeBid('a1', 10)
|
||||
m._onGossip({ type: 'auction-bid', auctionId: 'a1', bid: { amount: 30, bidder: 'remote', at: 2 } })
|
||||
t.is(m.highestBid('a1').amount, 30)
|
||||
t.is(m.withdrawBid('a1', 'remote'), 1)
|
||||
t.is(m.highestBid('a1').amount, 10)
|
||||
t.ok(m.cancelAuction('a1'))
|
||||
t.is(m.listAuctionIds().length, 0)
|
||||
await m.close()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user