-
Notifications
You must be signed in to change notification settings - Fork 32
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
Some other removal of request_id #387
Conversation
WalkthroughThe pull request introduces significant modifications to the Changes
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
src/app/add_invoice.rs (1)
Line range hint
25-78
:request_id
is still being sent to counterparts, conflicting with PR objectivesThe pull request aims to remove all instances where
request_id
is sent to counterparts. However, in this code segment,request_id
is being retrieved and passed to functions likesend_cant_do_msg
andsend_new_order_msg
. These functions may includerequest_id
in messages sent to counterparts, which contradicts the PR's objective.Please review the usage of
request_id
in these function calls and ensure it is not sent to counterparts to align with the PR objectives.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
src/app/add_invoice.rs
(1 hunks)src/app/cancel.rs
(4 hunks)
🔇 Additional comments (5)
src/app/cancel.rs (4)
Line range hint 139-143
: LGTM: Appropriate removal of request_id for counterparty notification
The change correctly removes the request_id
when notifying the counterparty about the cooperative cancellation acceptance, as they don't need to track this specific request.
Line range hint 164-168
: LGTM: Appropriate removal of request_id for cancellation initiation
The change correctly removes the request_id
when notifying the counterparty about a new cancellation request. This allows the counterparty to generate their own request_id
if they choose to respond to the cancellation request.
Line range hint 218-223
: LGTM: Consistent removal of request_id across cancellation flows
The changes consistently remove the request_id
when sending cancellation notifications to counterparties in both invoice-related cancellation flows. This maintains a uniform pattern across all cancellation scenarios.
Also applies to: 287-292
Line range hint 139-292
: Verify complete coverage of request_id removal
Let's ensure we haven't missed any instances where request_id
might still be sent to counterparties.
✅ Verification successful
All request_id removals for counterparty messages are correctly implemented
Based on the comprehensive search results, I can confirm that:
- All
send_new_order_msg
calls to counterparties (peer/seller/buyer) consistently useNone
forrequest_id
- The original messages to the initiating party correctly preserve the
request_id
- The pattern is consistently applied across all relevant modules including cancel, release, and dispute flows
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search for potential missed instances of request_id being sent to counterparties
# Look for send_new_order_msg calls that might still pass request_id to counterparties
rg -A 5 "send_new_order_msg.*counterparty|send_new_order_msg.*peer|send_new_order_msg.*seller|send_new_order_msg.*buyer"
# Look for any TODO or FIXME comments related to request_id
rg "TODO.*request_id|FIXME.*request_id"
Length of output: 1400
Script:
#!/bin/bash
# Let's search for all send_new_order_msg calls to get a complete picture
rg -A 3 "send_new_order_msg\("
# Also search for any direct references to request_id in message sending contexts
rg -A 3 "request_id.*send|send.*request_id"
Length of output: 14406
src/app/add_invoice.rs (1)
22-26
: Good use of comments to enhance code readability
The added comments at lines 22, 24, and 26 improve the clarity of the code by clearly indicating the purpose of each section.
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.
utACK
@grunch @bilthon
Removed some others request_id sent to counterpart.
Please double check guys!
Summary by CodeRabbit
New Features
Bug Fixes
Documentation