Skip to content

Commit

Permalink
chore: tweak transfer gap query
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Jul 5, 2023
1 parent 94c7acf commit 5a4113c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pg/pg-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,9 @@ export class PgStore extends BasePgStore {
// Do we have the location from `prev_output`? Warn if we don't.
if (args.location.prev_output) {
const prev = await sql`
SELECT id FROM locations WHERE prev_output = ${args.location.prev_output}
SELECT id FROM locations
WHERE genesis_id = ${args.location.genesis_id}
AND prev_output = ${args.location.prev_output}
`;
if (prev.count === 0) {
logger.warn(
Expand Down

0 comments on commit 5a4113c

Please sign in to comment.