chore: filter attestation list by transaction id#1257
Conversation
WalkthroughThis change adds filtering capability to the Changes
Sequence DiagramsequenceDiagram
actor Client
participant ListAttest as list_attestations
participant DB as Database
Client->>ListAttest: request_tx_id, requester, limit, offset, hash_filter
alt request_tx_id IS NOT NULL
ListAttest->>DB: SELECT by exact request_tx_id
DB-->>ListAttest: Single attestation (or none)
ListAttest-->>Client: Result [0..1 row]
else request_tx_id IS NULL
alt requester IS NOT NULL
ListAttest->>DB: SELECT filtered by requester<br/>with ordering & pagination
DB-->>ListAttest: Attestations matching requester
ListAttest-->>Client: Results with offset/limit
else requester IS NULL
ListAttest->>DB: SELECT all attestations<br/>with ordering & pagination
DB-->>ListAttest: All attestations
ListAttest-->>Client: Results with offset/limit
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-10-10T13:00:13.731ZApplied to files:
📚 Learning: 2025-10-10T13:00:14.189ZApplied to files:
🧬 Code graph analysis (1)tests/streams/attestation/attestation_retrieval_test.go (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Time Submission Status
|
|
The CI is failing @williamrusdyputra |
isn't it because of the whitelist attestation fees, I saw previous PRs also failed CI |
resolves: https://github.com/trufnetwork/trufscan/issues/139
Summary by CodeRabbit
New Features
Tests