Skip to content

Commit 7bf8e6f

Browse files
Merge branch 'develop'
2 parents 667f6db + add7b96 commit 7bf8e6f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/dappmanager/src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as db from "@dappnode/db";
22
import { eventBus } from "@dappnode/eventbus";
3-
import initializeDb from "./initializeDb.js";
3+
import { initializeDb } from "./initializeDb.js";
44
import {
55
checkDockerNetwork,
66
copyHostScripts,
@@ -35,6 +35,11 @@ import { DappNodeRegistry } from "@dappnode/toolkit";
3535

3636
const controller = new AbortController();
3737

38+
// Initialize DB must be the first step so the db has the required values
39+
initializeDb()
40+
.then(() => logs.info("Initialized Database"))
41+
.catch(e => logs.error("Error inititializing Database", e));
42+
3843
const ethUrl = await getEthUrl().catch(e => {
3944
logs.error(
4045
`Error getting ethUrl, using default ${params.ETH_MAINNET_RPC_URL_REMOTE}`,
@@ -86,11 +91,6 @@ if (params.TEST) startTestApi();
8691
// Execute migrations
8792
executeMigrations().catch(e => logs.error("Error on executeMigrations", e));
8893

89-
// Initialize DB
90-
initializeDb()
91-
.then(() => logs.info("Initialized Database"))
92-
.catch(e => logs.error("Error inititializing Database", e));
93-
9494
// Start daemons
9595
startDaemons(dappnodeInstaller, controller.signal);
9696

packages/dappmanager/src/initializeDb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function returnNullIfError(
4242
* - Get network status variables
4343
* - Trigger a dyndns loop
4444
*/
45-
export default async function initializeDb(): Promise<void> {
45+
export async function initializeDb(): Promise<void> {
4646
/**
4747
* ipfsClientTarget
4848
*/

0 commit comments

Comments
 (0)