Skip to content

Commit

Permalink
fix: ignore spent as fee on gap check (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
g0drlc committed Mar 9, 2024
1 parent 65b2c0c commit f5b97eb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pg/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f5b97eb

Please sign in to comment.