This commit is contained in:
hatim boufnichel 2024-04-25 19:49:27 +02:00
parent f272865abf
commit d3ccd87c6e

View file

@ -4,9 +4,9 @@ import LND from '../services/lnd/lnd.js'
export const setupNetwork = async () => { export const setupNetwork = async () => {
const settings = LoadTestSettingsFromEnv() const settings = LoadTestSettingsFromEnv()
const core = new BitcoinCoreWrapper(settings) //const core = new BitcoinCoreWrapper(settings)
await core.InitAddress() //await core.InitAddress()
await core.Mine(1) //await core.Mine(1)
const lnd = new LND(settings.lndSettings, () => { }, () => { }, () => { }, () => { }) const lnd = new LND(settings.lndSettings, () => { }, () => { }, () => { }, () => { })
for (let i = 0; i < 30; i++) { for (let i = 0; i < 30; i++) {
try { try {
@ -15,6 +15,7 @@ export const setupNetwork = async () => {
throw new Error("not synced to chain") throw new Error("not synced to chain")
} }
if (!info.syncedToGraph) { if (!info.syncedToGraph) {
await lnd.ConnectPeer({})
throw new Error("not synced to graph") throw new Error("not synced to graph")
} }
return return