Skip to content
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: treat backfill entry as authoritative in get-logs endpoint
When a backfill entry exists (even if errored), skip the Redis lookup
entirely. Previously an errored backfill entry would fall through to
Redis, potentially returning stale data for an orphaned transaction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
  • Loading branch information
eabdelmoneim and claude committed Mar 24, 2026
commit be510beb2684abaae616ed6e28fb74b762539ca3
18 changes: 13 additions & 5 deletions src/server/routes/transaction/blockchain/get-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,20 @@ export async function getTransactionLogs(fastify: FastifyInstance) {
// queue IDs that are stuck in Redis (e.g. orphaned "queued" transactions).
if (env.ENABLE_TX_BACKFILL_FALLBACK) {
const backfill = await TransactionDB.getBackfill(queueId);
if (backfill?.status === "mined" && backfill.transactionHash && isHex(backfill.transactionHash)) {
hash = backfill.transactionHash as Hex;
if (backfill) {
// Backfill entry exists and is authoritative — only set hash if mined.
// If backfill is errored, hash stays undefined and we skip Redis lookup.
if (backfill.status === "mined" && backfill.transactionHash && isHex(backfill.transactionHash)) {
hash = backfill.transactionHash as Hex;
}
} else {
// No backfill entry — fall back to Redis.
const transaction = await TransactionDB.get(queueId);
if (transaction?.status === "mined") {
hash = transaction.transactionHash;
}
}
}

if (!hash) {
} else {
const transaction = await TransactionDB.get(queueId);
if (transaction?.status === "mined") {
hash = transaction.transactionHash;
Expand Down
Loading