From 2ba21a6e1d55acb660ab4fe1870e67fc6142dcdc Mon Sep 17 00:00:00 2001 From: Rafael Cardenas Date: Fri, 30 Jun 2023 13:52:27 -0600 Subject: [PATCH] fix: don't ping chainhook node if auto predicate reg is disabled --- src/chainhook/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chainhook/server.ts b/src/chainhook/server.ts index 37a2f21d..2f9804c7 100644 --- a/src/chainhook/server.ts +++ b/src/chainhook/server.ts @@ -147,8 +147,8 @@ export async function buildChainhookServer(args: { db: PgStore }) { }).withTypeProvider(); fastify.decorate('db', args.db); - fastify.addHook('onReady', waitForChainhookNode); if (ENV.CHAINHOOK_AUTO_PREDICATE_REGISTRATION) { + fastify.addHook('onReady', waitForChainhookNode); fastify.addHook('onReady', registerChainhookPredicates); fastify.addHook('onClose', removeChainhookPredicates); }