diff --git a/src/services/lnd/lnd.ts b/src/services/lnd/lnd.ts index 8a4b744d5..00fdb5057 100644 --- a/src/services/lnd/lnd.ts +++ b/src/services/lnd/lnd.ts @@ -371,6 +371,11 @@ export default class { return res.response } + async ListPeers() { + const res = await this.lightning.listPeers({ latestError: true }, DeadLineMetadata()) + return res.response + } + async OpenChannel(destination: string, closeAddress: string, fundingAmount: number, pushSats: number) { const abortController = new AbortController() const req = OpenChannelReq(destination, closeAddress, fundingAmount, pushSats) diff --git a/src/tests/networkSetup.ts b/src/tests/networkSetup.ts index b9ffbb821..0c2241be9 100644 --- a/src/tests/networkSetup.ts +++ b/src/tests/networkSetup.ts @@ -15,12 +15,13 @@ export const setupNetwork = async () => { throw new Error("not synced to chain") } if (!info.syncedToGraph) { - await lnd.ConnectPeer({}) + //await lnd.ConnectPeer({}) throw new Error("not synced to graph") } return } catch (e) { console.log("waiting for lnd to be ready", e) + console.log(await lnd.ListPeers()) await new Promise(resolve => setTimeout(resolve, 1000)) } }