multi: persist swap cost and report over rpc - #55
Merged
Conversation
joostjager
force-pushed
the
report-cost
branch
3 times, most recently
from
May 15, 2019 12:13
0dedcf6 to
39997a9
Compare
Roasbeef
requested changes
May 18, 2019
Roasbeef
left a comment
Member
There was a problem hiding this comment.
Nice! This should address the biggest complaint we've seen so far from clients. I've completed a first pass review, and will have also launched a series of new swaps on testnet to exercise the new RPC and CLI modifcations.
Member
We should tack on a unit suffix, in this case being satoshis. |
Contributor
Author
We also don't show a unit when the swap is initiated. Adding the unit here would bring the number of different formats to three: I would leave it in line with the cli for this pr. |
This commits lays down the foundation in the database for adding more persistent state data to swaps.
Previous code in log.go assumed there would by sub system level enable/disable for loop. This is not yet in place, so converting to same style as used in the lndclient package.
Contributor
Author
|
@Roasbeef ptal |
Roasbeef
reviewed
May 21, 2019
Roasbeef
left a comment
Member
There was a problem hiding this comment.
Migration went smoothly 👍
LGTM 🦎
Roasbeef
approved these changes
May 21, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously swap cost only showed up as a log line in the
loopdoutput. This PR extends reporting to the rpc level and modifiesloop monitorto display the costs after the swap finishes.Costs are also stored in the database so that costs of completed swaps can be retrieved.
A current limitation is that in some cases when
loopdis restarted while a swap is pending, the off-chain costs will be reported as zero. This can be fixed when thelndreliable payment PRs are in.