up
This commit is contained in:
parent
082181f385
commit
9a89eb0e23
1 changed files with 11 additions and 0 deletions
|
|
@ -23,6 +23,8 @@ export const setupNetwork = async () => {
|
|||
const addresses = await getAddresses(instances)
|
||||
await sendCoinsToAddresses(core, addresses)
|
||||
console.log("done sending coins, opening channels")
|
||||
console.log(await getAllInfo(instances))
|
||||
console.log(await getAllBalances(instances))
|
||||
await openChannels(instances, connectInfo, addresses)
|
||||
await core.Mine(6)
|
||||
console.log("done opening channels, sending balancing payment")
|
||||
|
|
@ -68,6 +70,15 @@ const getAllInfo = async (instances: LndInstances) => {
|
|||
|
||||
}
|
||||
|
||||
const getAllBalances = async (instances: LndInstances) => {
|
||||
const aliceBal = await instances.alice.GetBalance()
|
||||
const bobBal = await instances.bob.GetBalance()
|
||||
const carolBal = await instances.carol.GetBalance()
|
||||
const daveBal = await instances.dave.GetBalance()
|
||||
return { aliceBal, bobBal, carolBal, daveBal }
|
||||
|
||||
}
|
||||
|
||||
const getConnectInfo = async (instances: LndInstances) => {
|
||||
const { aliceInfo, bobInfo, carolInfo, daveInfo } = await getAllInfo(instances)
|
||||
const [alicePub, aliceHost] = aliceInfo.uris[0].split('@')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue