-
Notifications
You must be signed in to change notification settings - Fork 123
Use reservation ids in instant out quote #918
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
Conversation
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.
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
instantout/manager.go:223
- [nitpick] The condition "len(reservationIDs) <= 0" can be replaced with "len(reservationIDs) == 0" for clarity, since a slice length will never be negative.
if len(reservationIDs) <= 0 {
2ad3af1 to
a43e192
Compare
bhandras
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.
LGTM 🎉
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.
needs rebase, otherwise LGTM✅
82258bd to
8762f4a
Compare
8762f4a to
1ce9bdd
Compare
This PR changes the way we quote for instantout by also providing the reservation ids.
Ai generated summary
This pull request includes changes to the
InstantOutQuotefunctionality to replace the use ofnumReservationswithreservationIds. The main goal is to improve the precision and flexibility of the reservation system.Key changes include:
Updates to request and response handling:
looprpc/client.proto: Deprecated thenum_reservationsfield and added a newreservation_idsfield in theInstantOutQuoteRequestmessage.swapserverrpc/instantout.pb.go: Updated theGetInstantOutQuoteRequeststruct to include the newreservation_idsfield and added a corresponding getter method. [1] [2]Modifications in the quote retrieval logic:
instantout/manager.go: Changed theGetInstantOutQuotemethod to acceptreservationIDsinstead ofnumReservationsand updated the logic to use the length ofreservationIDsfor fee calculations. [1] [2] [3]Adjustments in the client-server communication:
loopd/swapclient_server.go: Updated theInstantOutQuotemethod to passreservationIdsto theGetInstantOutQuotemethod.cmd/loop/instantout.go: Modified theInstantOutQuotecall to useReservationIdsinstead ofNumReservations.These changes ensure that the system now uses specific reservation IDs, providing more accurate and detailed control over the reservations used in the swap process.