All files / src/util/DbSyncProvider util.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 0/0
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16            51x 51x   51x            
export interface LedgerTipModel {
  block_no: number;
  slot_no: string;
  hash: Buffer;
}
 
export const DB_MAX_SAFE_INTEGER = 2_147_483_647;
export const DB_BLOCKS_BEHIND_TOLERANCE = 5;
 
export const findLedgerTip = `
SELECT
  block_no, slot_no, hash
FROM block
WHERE
  block_no = (SELECT MAX(block_no) FROM block)`;