Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
boufni95 committed Apr 24, 2024
1 parent 9e76e36 commit c573b00
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tests/networkSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export const setupNetwork = async () => {
}

const sendBalancingPayment = async (instances: LndInstances) => {
const invoice = await instances.dave.NewInvoice(2_000_000, "balancing payment", 3600)
const payment = await instances.bob.PayInvoice(invoice.payRequest, 0, 50_000)
const invoice = await instances.dave.NewInvoice(20_000_000, "balancing_payment", 3600)
const payment = await instances.bob.PayInvoice(invoice.payRequest, 0, 500_000)
console.log({ payment })
}

const openChannels = async (core: BitcoinCoreWrapper, instances: LndInstances, info: InstancesInfo, addresses: Addresses) => {
await instances.bob.OpenChannel(info.carol.pubkey, addresses.bob, 5_000_000, 0)
await instances.carol.OpenChannel(info.alice.pubkey, addresses.carol, 5_000_000, 0)
await instances.alice.OpenChannel(info.dave.pubkey, addresses.alice, 5_000_000, 0)
await instances.bob.OpenChannel(info.carol.pubkey, addresses.bob, 50_000_000, 0)
await instances.carol.OpenChannel(info.alice.pubkey, addresses.carol, 50_000_000, 0)
await instances.alice.OpenChannel(info.dave.pubkey, addresses.alice, 50_000_000, 0)
await slowMine(core, 10)

}
Expand All @@ -52,7 +52,7 @@ const sendCoinsToAddresses = async (core: BitcoinCoreWrapper, addresses: Address
await core.SendToAddress(addresses.bob, 10)
await core.SendToAddress(addresses.carol, 10)
await core.SendToAddress(addresses.dave, 10)
await slowMine(core, 6)
await slowMine(core, 10)
}

const slowMine = async (core: BitcoinCoreWrapper, blocks: number) => {
Expand Down

0 comments on commit c573b00

Please sign in to comment.