-
Notifications
You must be signed in to change notification settings - Fork 110
Conversation
57ff853
to
49b2d83
Compare
8925e0b
to
ca9cd7b
Compare
ca9cd7b
to
9b5861e
Compare
9b5861e
to
86b70f4
Compare
case <-ctx.Done(): | ||
t.Fatal("Expected one cheque, but there is none") | ||
default: | ||
if creditor.getLastSentCheque() != nil { |
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 it
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.
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.
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.
Builds failed but it seems unrelated.
Let's wait until core is aware of these failures (I already reported) and then restart the builds before merging, better to have had green builds before merging.
Great job.
This PR
TestEmitCheque
to usep2ptest
to also verify that the correct message is being sentTestTriggerPaymentThreshold
to usep2ptest
to also verify that the correct message is being sentTestTriggerDisconnectThreshold
to test the right thing for pending cheques