-
Notifications
You must be signed in to change notification settings - Fork 122
swapserverrpc: arbitrary static swap amount #951
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
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 🎉
f87ec32
to
947d08b
Compare
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! 🌴
One comment.
swapserverrpc/staticaddr.proto
Outdated
server will take out this amount from the total value of provided | ||
deposit_outpoints and will send the change back to the static address. If | ||
not specified the server will use the total amount of the deposit_outpoints | ||
as swap amount. |
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.
What happens, if the amount is too close to the total amount (so the change would be dust)? I think it makes sense if it fails and suggests to remove the flag to use the whole amount.
Could you add the actual expected behavior in this case to the comment, please?
Also, if the amount is equal to the total amount, it makes sense just to succeed, right? And if higher - fail.
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.
I expanded the comment to explain.
Note, there is no flag to use the whole amount of provided deposits for backwards compatibility. If deposits are specified without an amount the whole amount is used.
947d08b
to
3fc955f
Compare
This PR adds an
amount
field to theServerStaticAddressLoopInRequest
.