From a1277cf39eb61e548f55bd8e524054db6a11c843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20C=C3=A1rdenas?= Date: Sat, 9 Mar 2024 00:24:01 -0600 Subject: [PATCH] fix: ignore spent as fee on gap check (#328) --- src/pg/helpers.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pg/helpers.ts b/src/pg/helpers.ts index f156a2ac..607ea80f 100644 --- a/src/pg/helpers.ts +++ b/src/pg/helpers.ts @@ -29,7 +29,14 @@ export function assertNoBlockInscriptionGap(args: { nextBlockHeight: number; }) { if (!ENV.INSCRIPTION_GAP_DETECTION_ENABLED) return; - const nextReveal = args.writes.find(w => 'inscription' in w && w.inscription.number >= 0); + const nextReveal = args.writes.find( + w => + 'inscription' in w && + w.inscription.number >= 0 && + // Spent as fee come first in the block + w.location.address != null && + w.location.address != '' + ); if (!nextReveal) return; const next = (nextReveal as InscriptionRevealData).inscription.number; if (next !== args.currentNumber + 1)