chore: filter attestations by hash and payload#1260
Conversation
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Tests
participant DB as list_attestations action
Test->>DB: call list_attestations(requester?, request_tx_id?, attestation_hash?, result_canonical?, limit, offset, order_by)
alt request_tx_id provided
DB-->>Test: SELECT ... WHERE request_tx_id = $request_tx_id ORDER BY created_height DESC, request_tx_id ASC LIMIT/OFFSET
else attestation_hash provided
DB-->>Test: SELECT ... WHERE attestation_hash = $attestation_hash ORDER BY created_height DESC, request_tx_id ASC LIMIT/OFFSET
else result_canonical provided
DB-->>Test: SELECT ... WHERE result_canonical = $result_canonical ORDER BY created_height DESC, request_tx_id ASC LIMIT/OFFSET
else requester IS NULL
DB-->>Test: SELECT ... (no requester filter) ORDER BY created_height {ASC|DESC} LIMIT/OFFSET
else
DB-->>Test: SELECT ... WHERE requester = $requester ORDER BY created_height {ASC|DESC} LIMIT/OFFSET
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings🧬 Code graph analysis (1)tests/streams/attestation/attestation_retrieval_test.go (2)
⏰ 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). (1)
🔇 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 |
|
log: test passed on |
Time Submission Status
|
resolves: https://github.com/trufnetwork/trufscan/issues/141
Summary by CodeRabbit
New Features
Improvements
Tests
✏️ Tip: You can customize this high-level summary in your review settings.