We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f877dd commit 2f58991Copy full SHA for 2f58991
test/context.go
@@ -151,7 +151,7 @@ func (ctx *Context) AssertPaid(
151
return done
152
}
153
154
- // Assert that client pays swap invoice.
+ // Assert that the client pays swap invoice.
155
for {
156
var swapPayment RouterPaymentChannelMessage
157
select {
@@ -171,7 +171,12 @@ func (ctx *Context) AssertPaid(
171
172
done := func(result error) {
173
if result != nil {
174
- swapPayment.Errors <- result
+ // Send a terminal FAILED status so the client
175
+ // always receives a non-nil PaymentStatus and
176
+ // won't dereference nil.
177
+ swapPayment.Updates <- lndclient.PaymentStatus{
178
+ State: lnrpc.Payment_FAILED,
179
+ }
180
return
181
182
swapPayment.Updates <- lndclient.PaymentStatus{
0 commit comments