This commit is contained in:
Raven Scott
2026-05-20 19:51:22 -04:00
parent 0f2ab198a6
commit 040f1d05ea
324 changed files with 2715 additions and 5466 deletions
+16
View File
@@ -10,6 +10,17 @@ test('mycelium-pool: donate borrow', async (t) => {
await p.close()
})
test('mycelium-pool: reject negative credits', async (t) => {
const p = new HyperP2PMyceliumPool()
try {
p.donate('peer-a', -1)
t.fail('expected error')
} catch (err) {
t.ok(/non-negative/i.test(err.message))
}
await p.close()
})
test('mycelium-pool: merge balances', async (t) => {
const a = new HyperP2PMyceliumPool()
const b = new HyperP2PMyceliumPool()
@@ -19,3 +30,8 @@ test('mycelium-pool: merge balances', async (t) => {
await a.close()
await b.close()
})
test('hyper-p2p-mycelium-pool: close without leak', async (t) => {
const m = new HyperP2PMyceliumPool()
await m.close()
t.pass()
})