up
This commit is contained in:
parent
4cf983342d
commit
a87cb4ab2c
1 changed files with 4 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ export const setupNetwork = async () => {
|
|||
await core.InitAddress()
|
||||
await core.Mine(1)
|
||||
const lnd = new LND(settings.lndSettings, () => { }, () => { }, () => { }, () => { })
|
||||
for (let i = 0; i < 10; i++) {
|
||||
for (let i = 0; i < 30; i++) {
|
||||
try {
|
||||
const info = await lnd.GetInfo()
|
||||
if (!info.syncedToChain) {
|
||||
|
|
@ -19,6 +19,9 @@ export const setupNetwork = async () => {
|
|||
}
|
||||
return
|
||||
} catch (e) {
|
||||
if (i % 5 === 0) {
|
||||
await core.Mine(1)
|
||||
}
|
||||
console.log("waiting for lnd to be ready")
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue