diff --git a/package.json b/package.json index 497dbf71..187924d2 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "archive-server": "./build/server.js" }, "scripts": { + "start": "npm run prepare && node build/server.js", "release": "npm run prepare && np --no-cleanup --no-tests --no-yarn --any-branch", "test": "echo \"Error: no test specified\" && exit 1", "check": "gts check", @@ -94,4 +95,4 @@ "overrides": { "axios": "1.6.1" } -} +} \ No newline at end of file diff --git a/src/API.ts b/src/API.ts index b3469729..658c7187 100644 --- a/src/API.ts +++ b/src/API.ts @@ -77,10 +77,18 @@ export function registerRoutes(server: FastifyInstance(data) } else { res = Crypto.sign({ diff --git a/src/NodeList.ts b/src/NodeList.ts index 1e5d120d..9848a1ac 100644 --- a/src/NodeList.ts +++ b/src/NodeList.ts @@ -449,4 +449,5 @@ export function clearNodeListCache(): void { export function toggleFirstNode(): void { foundFirstNode = !foundFirstNode + Logger.mainLogger.debug('foundFirstNode', foundFirstNode) } diff --git a/src/dbstore/accounts.ts b/src/dbstore/accounts.ts index 09397361..d63c092a 100644 --- a/src/dbstore/accounts.ts +++ b/src/dbstore/accounts.ts @@ -47,7 +47,7 @@ export async function bulkInsertAccounts(accounts: AccountCopy[]): Promise sql = sql + ', (' + placeholders + ')' } await db.run(sql, values) - Logger.mainLogger.debug('Successfully inserted Accounts', accounts.length) + if (config.VERBOSE) Logger.mainLogger.debug('Successfully inserted Accounts', accounts.length) } catch (e) { Logger.mainLogger.error(e) Logger.mainLogger.error('Unable to bulk insert Accounts', accounts.length) diff --git a/src/dbstore/cycles.ts b/src/dbstore/cycles.ts index ae52b870..3d0ee79d 100644 --- a/src/dbstore/cycles.ts +++ b/src/dbstore/cycles.ts @@ -43,7 +43,7 @@ export async function bulkInsertCycles(cycles: Cycle[]): Promise { sql = sql + ', (' + placeholders + ')' } await db.run(sql, values) - Logger.mainLogger.debug('Successfully inserted Cycles', cycles.length) + if (config.VERBOSE) Logger.mainLogger.debug('Successfully inserted Cycles', cycles.length) } catch (e) { Logger.mainLogger.error(e) Logger.mainLogger.error('Unable to bulk insert Cycles', cycles.length) diff --git a/src/dbstore/originalTxsData.ts b/src/dbstore/originalTxsData.ts index 81cdf9f4..05f4185b 100644 --- a/src/dbstore/originalTxsData.ts +++ b/src/dbstore/originalTxsData.ts @@ -56,7 +56,8 @@ export async function bulkInsertOriginalTxsData(originalTxsData: OriginalTxData[ sql = sql + ', (' + placeholders + ')' } await db.run(sql, values) - Logger.mainLogger.debug('Successfully inserted OriginalTxsData', originalTxsData.length) + if (config.VERBOSE) + Logger.mainLogger.debug('Successfully inserted OriginalTxsData', originalTxsData.length) } catch (e) { Logger.mainLogger.error(e) Logger.mainLogger.error('Unable to bulk insert OriginalTxsData', originalTxsData.length) diff --git a/src/dbstore/receipts.ts b/src/dbstore/receipts.ts index 43427e78..64d74c00 100644 --- a/src/dbstore/receipts.ts +++ b/src/dbstore/receipts.ts @@ -115,7 +115,7 @@ export async function bulkInsertReceipts(receipts: Receipt[]): Promise { sql = sql + ', (' + placeholders + ')' } await db.run(sql, values) - Logger.mainLogger.debug('Successfully inserted Receipts', receipts.length) + if (config.VERBOSE) Logger.mainLogger.debug('Successfully inserted Receipts', receipts.length) } catch (e) { Logger.mainLogger.error(e) Logger.mainLogger.error('Unable to bulk insert Receipts', receipts.length) diff --git a/src/dbstore/transactions.ts b/src/dbstore/transactions.ts index 4cba0c3f..afe955c2 100644 --- a/src/dbstore/transactions.ts +++ b/src/dbstore/transactions.ts @@ -53,7 +53,7 @@ export async function bulkInsertTransactions(transactions: Transaction[]): Promi sql = sql + ', (' + placeholders + ')' } await db.run(sql, values) - Logger.mainLogger.debug('Successfully inserted Transactions', transactions.length) + if (config.VERBOSE) Logger.mainLogger.debug('Successfully inserted Transactions', transactions.length) } catch (e) { Logger.mainLogger.error(e) Logger.mainLogger.error('Unable to bulk insert Transactions', transactions.length)