up
This commit is contained in:
parent
5ddbc9b8f5
commit
2b95f3adfc
3 changed files with 6 additions and 6 deletions
|
|
@ -30,7 +30,7 @@ export class LiquidityProvider {
|
||||||
pendingPayments: Record<string, number> = {}
|
pendingPayments: Record<string, number> = {}
|
||||||
updateProviderBalance: (balance: number) => Promise<void>
|
updateProviderBalance: (balance: number) => Promise<void>
|
||||||
// make the sub process accept client
|
// make the sub process accept client
|
||||||
constructor(pubDestination: string, utils: Utils, invoicePaidCb: InvoicePaidCb, updateProviderBalance: (balance: number) => Promise<void>) {
|
constructor(pubDestination: string, utils: Utils, invoicePaidCb: InvoicePaidCb, updateProviderBalance: (balance: number) => Promise<any>) {
|
||||||
this.utils = utils
|
this.utils = utils
|
||||||
if (!pubDestination) {
|
if (!pubDestination) {
|
||||||
this.log("No pub provider to liquidity provider, will not be initialized")
|
this.log("No pub provider to liquidity provider, will not be initialized")
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ export const setupNetwork = async () => {
|
||||||
await core.InitAddress()
|
await core.InitAddress()
|
||||||
await core.Mine(1)
|
await core.Mine(1)
|
||||||
const setupUtils = new Utils(settings)
|
const setupUtils = new Utils(settings)
|
||||||
const alice = new LND(settings.lndSettings, new LiquidityProvider("", setupUtils, async () => { }, () => { }), setupUtils, async () => { }, async () => { }, () => { }, () => { })
|
const alice = new LND(settings.lndSettings, new LiquidityProvider("", setupUtils, async () => { }, async () => { }), setupUtils, async () => { }, async () => { }, () => { }, () => { })
|
||||||
const bob = new LND({ ...settings.lndSettings, mainNode: settings.lndSettings.otherNode }, new LiquidityProvider("", setupUtils, async () => { }, () => { }), setupUtils, async () => { }, async () => { }, () => { }, () => { })
|
const bob = new LND({ ...settings.lndSettings, mainNode: settings.lndSettings.otherNode }, new LiquidityProvider("", setupUtils, async () => { }, async () => { }), setupUtils, async () => { }, async () => { }, () => { }, () => { })
|
||||||
await tryUntil<void>(async i => {
|
await tryUntil<void>(async i => {
|
||||||
const peers = await alice.ListPeers()
|
const peers = await alice.ListPeers()
|
||||||
if (peers.peers.length > 0) {
|
if (peers.peers.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -47,15 +47,15 @@ export const SetupTest = async (d: Describe): Promise<TestBase> => {
|
||||||
const user2 = { userId: u2.info.userId, appUserIdentifier: u2.identifier, appId: app.appId }
|
const user2 = { userId: u2.info.userId, appUserIdentifier: u2.identifier, appId: app.appId }
|
||||||
|
|
||||||
const extermnalUtils = new Utils(settings)
|
const extermnalUtils = new Utils(settings)
|
||||||
const externalAccessToMainLnd = new LND(settings.lndSettings, new LiquidityProvider("", extermnalUtils, async () => { }, () => { }), extermnalUtils, async () => { }, async () => { }, () => { }, () => { })
|
const externalAccessToMainLnd = new LND(settings.lndSettings, new LiquidityProvider("", extermnalUtils, async () => { }, async () => { }), extermnalUtils, async () => { }, async () => { }, () => { }, () => { })
|
||||||
await externalAccessToMainLnd.Warmup()
|
await externalAccessToMainLnd.Warmup()
|
||||||
|
|
||||||
const otherLndSetting = { ...settings.lndSettings, mainNode: settings.lndSettings.otherNode }
|
const otherLndSetting = { ...settings.lndSettings, mainNode: settings.lndSettings.otherNode }
|
||||||
const externalAccessToOtherLnd = new LND(otherLndSetting, new LiquidityProvider("", extermnalUtils, async () => { }, () => { }), extermnalUtils, async () => { }, async () => { }, () => { }, () => { })
|
const externalAccessToOtherLnd = new LND(otherLndSetting, new LiquidityProvider("", extermnalUtils, async () => { }, async () => { }), extermnalUtils, async () => { }, async () => { }, () => { }, () => { })
|
||||||
await externalAccessToOtherLnd.Warmup()
|
await externalAccessToOtherLnd.Warmup()
|
||||||
|
|
||||||
const thirdLndSetting = { ...settings.lndSettings, mainNode: settings.lndSettings.thirdNode }
|
const thirdLndSetting = { ...settings.lndSettings, mainNode: settings.lndSettings.thirdNode }
|
||||||
const externalAccessToThirdLnd = new LND(thirdLndSetting, new LiquidityProvider("", extermnalUtils, async () => { }, () => { }), extermnalUtils, async () => { }, async () => { }, () => { }, () => { })
|
const externalAccessToThirdLnd = new LND(thirdLndSetting, new LiquidityProvider("", extermnalUtils, async () => { }, async () => { }), extermnalUtils, async () => { }, async () => { }, () => { }, () => { })
|
||||||
await externalAccessToThirdLnd.Warmup()
|
await externalAccessToThirdLnd.Warmup()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue