Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/function naming and comments errors #136

Open
wants to merge 21 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/archiver_data_patcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const runProgram = async (): Promise<void> => {
}
}

const totalCycles = await CycleDB.queryCyleCount()
const totalCycles = await CycleDB.queryCycleCount()
const totalAccounts = await AccountDB.queryAccountCount()
const totalTransactions = await TransactionDB.queryTransactionCount()
const totalReceipts = await ReceiptDB.queryReceiptCount()
Expand Down
2 changes: 1 addition & 1 deletion scripts/repair_missing_cycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const start = async (): Promise<void> => {
}
await dbstore.initializeDB(config)

const lastStoredCycleCount = await CycleDB.queryCyleCount()
const lastStoredCycleCount = await CycleDB.queryCycleCount()
const lastStoredCycle = (await CycleDB.queryLatestCycleRecords(1))[0]
console.log('lastStoredCycleCount', lastStoredCycleCount, 'lastStoredCycleCounter', lastStoredCycle.counter)

Expand Down
2 changes: 1 addition & 1 deletion src/API.ts
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ export function registerRoutes(server: FastifyInstance<Server, IncomingMessage,
reply.send({ success: false, error: result.error })
return
}
const totalCycles = await CycleDB.queryCyleCount()
const totalCycles = await CycleDB.queryCycleCount()
const totalAccounts = await AccountDB.queryAccountCount()
const totalTransactions = await TransactionDB.queryTransactionCount()
const totalReceipts = await ReceiptDB.queryReceiptCount()
Expand Down
4 changes: 2 additions & 2 deletions src/Data/AccountDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface WrappedData {
accountId: string
/** hash of the data blob */
stateId: string
/** data blob opaqe */
/** data blob opaque */
data: unknown
/** Timestamp */
timestamp: number
Expand Down Expand Up @@ -177,7 +177,7 @@ export const validateGlobalAccountReportRequest = (
}
/**
*
* This function is contructed to provide data in similar way as the `getAccountDataByRangeSmart` function in the validator
* This function is constructed to provide data in similar way as the `getAccountDataByRangeSmart` function in the validator
* @param payload
* @returns GetAccountDataByRangeSmart
*/
Expand Down
2 changes: 1 addition & 1 deletion src/dbstore/cycles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export async function queryCycleRecordsBetween(
}
}

export async function queryCyleCount(): Promise<number> {
export async function queryCycleCount(): Promise<number> {
let cycles
try {
const sql = `SELECT COUNT(*) FROM cycles`
Expand Down
4 changes: 2 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ async function syncAndStartServer(): Promise<void> {
let lastStoredReceiptCount = await ReceiptDB.queryReceiptCount()

// Retrieve the count of cycles currently stored in the database
let lastStoredCycleCount = await CycleDB.queryCyleCount()
let lastStoredCycleCount = await CycleDB.queryCycleCount()
// let lastStoredOriginalTxCount = await OriginalTxDB.queryOriginalTxDataCount()
// Query the latest cycle record from the database
let lastStoredCycleInfo = (await CycleDB.queryLatestCycleRecords(1))[0]
Expand Down Expand Up @@ -410,7 +410,7 @@ async function syncAndStartServer(): Promise<void> {
// Query for the cycle and receipt counts
lastStoredReceiptCount = await ReceiptDB.queryReceiptCount()
// lastStoredOriginalTxCount = await OriginalTxDB.queryOriginalTxDataCount()
lastStoredCycleCount = await CycleDB.queryCyleCount()
lastStoredCycleCount = await CycleDB.queryCycleCount()
lastStoredCycleInfo = (await CycleDB.queryLatestCycleRecords(1))[0]

// Check for any missing data and perform syncing if necessary
Expand Down