-
Notifications
You must be signed in to change notification settings - Fork 52
chore: fix inaccurate comments for GetAddressNotifications function #871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughReplaced group-based notifications with an address-centric notifier: added Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Service as NBXplorer Service
participant WS as WebSocket
participant Query as UTXO Query
participant Channel as Notification Channel
Caller->>Service: GetAddressNotifications(ctx)
activate Service
Service->>Service: Ensure/create group
Service->>WS: Open WebSocket connection
activate WS
WS-->>Service: Connected
loop Listen for events
WS-->>Service: newtransaction event
Service->>Service: Parse tx hash
Service->>Query: searchNewUTXOs(txHash)
activate Query
Query-->>Service: []ports.Utxo
deactivate Query
Service->>Channel: send []ports.Utxo (buffered)
end
alt Read error or disconnect
Service->>WS: reconnect loop until context done
end
Service-->>Caller: returns <-chan []ports.Utxo
deactivate Service
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
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 |
altafan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boqishan thank you for the contrib! The comment was quite outdated, nice catch :).
I left a suggestion for a better description of what's going on under the hood with this function.
Signed-off-by: boqishan <boqishan@126.com>
Updated the comments for the GetAddressNotifications function to accurately reflect its behavior of monitoring address notifications via WebSocket events for new transactions and returning related UTXOs, correcting the previous misleading description.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.