invoices+htlcswitch+lnrpc: cancel invoice

This commit is contained in:
Joost Jager committed 2019-02-06 07:29:18 +01:00
1 parent 9cd88a04b7
commit 1b87fbfab2
13 files changed
+1020 -590

No files matched your search

+4 -1
View File
@@ -59,8 +59,11 @@ func CreateRPCInvoice(invoice *channeldb.Invoice,
state = lnrpc.Invoice_OPEN
case channeldb.ContractSettled:
state = lnrpc.Invoice_SETTLED
case channeldb.ContractCanceled:
state = lnrpc.Invoice_CANCELED
default:
return nil, fmt.Errorf("unknown invoice state")
return nil, fmt.Errorf("unknown invoice state %v",
invoice.Terms.State)
}
return &lnrpc.Invoice{