wire stoppers
This commit is contained in:
parent
164b153c2e
commit
7e77e3c7c1
4 changed files with 9 additions and 9 deletions
|
|
@ -3,15 +3,17 @@ import { StateBundler } from "../storage/tlv/stateBundler.js";
|
|||
import { TlvStorageFactory } from "../storage/tlv/tlvFilesStorageFactory.js";
|
||||
|
||||
export class Utils {
|
||||
|
||||
tlvStorageFactory: TlvStorageFactory
|
||||
stateBundler: StateBundler
|
||||
settings: MainSettings
|
||||
constructor(settings: MainSettings, tlvStorageFactory: TlvStorageFactory) {
|
||||
constructor(settings: MainSettings) {
|
||||
this.settings = settings
|
||||
this.stateBundler = new StateBundler(settings.storageSettings, tlvStorageFactory)
|
||||
this.tlvStorageFactory = new TlvStorageFactory()
|
||||
this.stateBundler = new StateBundler(settings.storageSettings, this.tlvStorageFactory)
|
||||
}
|
||||
|
||||
Stop() {
|
||||
this.stateBundler.Stop()
|
||||
this.tlvStorageFactory.disconnect()
|
||||
}
|
||||
}
|
||||
|
|
@ -17,10 +17,9 @@ export type AppData = {
|
|||
name: string;
|
||||
}
|
||||
export const initMainHandler = async (log: PubLogger, mainSettings: MainSettings) => {
|
||||
const tlvStorageFactory = new TlvStorageFactory()
|
||||
const utils = new Utils(mainSettings, tlvStorageFactory)
|
||||
const utils = new Utils(mainSettings)
|
||||
const storageManager = new Storage(mainSettings.storageSettings)
|
||||
await storageManager.Connect(log, tlvStorageFactory)
|
||||
await storageManager.Connect(log, utils.tlvStorageFactory)
|
||||
/* const manualMigration = await TypeOrmMigrationRunner(log, storageManager, mainSettings.storageSettings.dbSettings, process.argv[2])
|
||||
if (manualMigration) {
|
||||
return
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export const setupNetwork = async () => {
|
|||
await core.InitAddress()
|
||||
await core.Mine(1)
|
||||
const tlvStorageFactory = new TlvStorageFactory()
|
||||
const setupUtils = new Utils(settings, tlvStorageFactory)
|
||||
const setupUtils = new Utils(settings)
|
||||
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 () => { }, async () => { }), setupUtils, async () => { }, async () => { }, () => { }, () => { })
|
||||
await tryUntil<void>(async i => {
|
||||
|
|
|
|||
|
|
@ -71,8 +71,7 @@ export const SetupTest = async (d: Describe): Promise<TestBase> => {
|
|||
const user1 = { userId: u1.info.userId, appUserIdentifier: u1.identifier, appId: app.appId }
|
||||
const user2 = { userId: u2.info.userId, appUserIdentifier: u2.identifier, appId: app.appId }
|
||||
|
||||
const tlvStorageFactory = new TlvStorageFactory()
|
||||
const extermnalUtils = new Utils(settings, tlvStorageFactory)
|
||||
const extermnalUtils = new Utils(settings)
|
||||
const externalAccessToMainLnd = new LND(settings.lndSettings, new LiquidityProvider("", extermnalUtils, async () => { }, async () => { }), extermnalUtils, async () => { }, async () => { }, () => { }, () => { })
|
||||
await externalAccessToMainLnd.Warmup()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue