loopout: cancel swap with server when off-chain fails

This commit is contained in:
carla 2021-05-24 08:46:03 +02:00
parent 6b732bacee
commit f166ce899d
No known key found for this signature in database
GPG key ID: 4CA7FE54A6213C91
4 changed files with 264 additions and 2 deletions

View file

@ -100,6 +100,7 @@ func TestFailOffchain(t *testing.T) {
signalPrepaymentResult(
errors.New(lndclient.PaymentResultUnknownPaymentHash),
)
<-ctx.serverMock.cancelSwap
ctx.assertStatus(loopdb.StateFailOffchainPayments)
ctx.assertStoreFinished(loopdb.StateFailOffchainPayments)