This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
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.
swap: use p2ptest for protocol tests #1934
swap: use p2ptest for protocol tests #1934
Changes from 2 commits
1287884
86b70f4
589f482
37c283a
6a3aea4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This actually means that if the remote peer does not confirm the cheque, the node remains "stuck" (
lastSentCheque
would not be released). So if a new cheque would be due and for some reason the confirmation msg never arrived, can the node process it based on the new cumulative amount or something? Or will it reject itThere 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.
As long as there is no confirmation the node will try to resend the current pending cheque once the threshold is reached again (the recipient will send the confirm message even if it has already processed it in the past) and then afterwards send a new cheque for the amount of debt incurred in the meantime. One of the reasons why we don't want to send a new cheque with a higher amount before that is that if the old cheque never was processed correctly by the recipient, then the recipient will consider the difference in
cumulativePayout
compared to the last cheque it has seen as the payment for the honey amount specified in the latest cheque (which doesn't match the expected price and will therefore be rejected). If there is no honey-to-money anymore in the new swap pricing, maybe we can also allow trying to resend with a higher payout.