Skip to content

Commit

Permalink
fix: set starting block height to 767430
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Mar 8, 2023
1 parent 47265a6 commit 84ce95e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion migrations/1677360299810_chain-tip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function up(pgm: MigrationBuilder): void {
block_height: {
type: 'int',
notNull: true,
default: 0,
default: 767430, // First inscription block height
},
});
// Ensure only a single row can exist
Expand Down
2 changes: 1 addition & 1 deletion src/chainhook/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function waitForChainhookNode(this: FastifyInstance) {
* the events server.
*/
async function registerChainhookPredicates(this: FastifyInstance) {
const blockHeight = 779924; //await this.db.getChainTipBlockHeight();
const blockHeight = await this.db.getChainTipBlockHeight();
logger.info(`EventServer registering predicates starting from block ${blockHeight}...`);

const register = async (name: string, uuid: string, blockHeight: number) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Status', () => {
expect(json).toStrictEqual({
server_version: 'ordinals-api v0.0.1 (test:123456)',
status: 'ready',
block_height: 0,
block_height: 767430,
});
const noVersionResponse = await fastify.inject({ method: 'GET', url: '/ordinals/' });
expect(response.statusCode).toEqual(noVersionResponse.statusCode);
Expand Down

0 comments on commit 84ce95e

Please sign in to comment.