longer route try
This commit is contained in:
parent
0c0cd7069e
commit
03e5d7847b
1 changed files with 14 additions and 0 deletions
|
|
@ -24,6 +24,13 @@ export const setupNetwork = async (): Promise<ChainTools> => {
|
||||||
await alice.ConnectPeer({ pubkey: '0232842d81b2423df97aa8a264f8c0811610a736af65afe2e145279f285625c1e4', host: "carol:9735" })
|
await alice.ConnectPeer({ pubkey: '0232842d81b2423df97aa8a264f8c0811610a736af65afe2e145279f285625c1e4', host: "carol:9735" })
|
||||||
await alice.ConnectPeer({ pubkey: '027c50fde118af534ff27e59da722422d2f3e06505c31e94c1b40c112c48a83b1c', host: "dave:9735" })
|
await alice.ConnectPeer({ pubkey: '027c50fde118af534ff27e59da722422d2f3e06505c31e94c1b40c112c48a83b1c', host: "dave:9735" })
|
||||||
}, 10, 8000)
|
}, 10, 8000)
|
||||||
|
await tryUntil<void>(async i => {
|
||||||
|
const { channels } = await alice.ListChannels()
|
||||||
|
if (channels.some(c => c.active)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
throw new Error("alice has no active channels")
|
||||||
|
}, 10, 6000)
|
||||||
await tryUntil<void>(async i => {
|
await tryUntil<void>(async i => {
|
||||||
const peers = await bob.ListPeers()
|
const peers = await bob.ListPeers()
|
||||||
if (peers.peers.length > 0) {
|
if (peers.peers.length > 0) {
|
||||||
|
|
@ -31,6 +38,13 @@ export const setupNetwork = async (): Promise<ChainTools> => {
|
||||||
}
|
}
|
||||||
await bob.ConnectPeer({ pubkey: '0232842d81b2423df97aa8a264f8c0811610a736af65afe2e145279f285625c1e4', host: "carol:9735" })
|
await bob.ConnectPeer({ pubkey: '0232842d81b2423df97aa8a264f8c0811610a736af65afe2e145279f285625c1e4', host: "carol:9735" })
|
||||||
}, 10, 8000)
|
}, 10, 8000)
|
||||||
|
await tryUntil<void>(async i => {
|
||||||
|
const { channels } = await bob.ListChannels()
|
||||||
|
if (channels.some(c => c.active)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
throw new Error("bob has no active channels")
|
||||||
|
}, 10, 6000)
|
||||||
|
|
||||||
await tryUntil<void>(async i => {
|
await tryUntil<void>(async i => {
|
||||||
const info = await alice.GetInfo()
|
const info = await alice.GetInfo()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue