channeldb: modify SettleInvoice to also return the invoice being settled

This commit is contained in:
Olaoluwa Osuntokun committed 2018-07-06 12:22:00 -07:00
1 parent 2c08a22ed3
commit e5c579120e
2 files changed
+29 -12

No files matched your search

+2 -2
View File
@@ -99,7 +99,7 @@ func TestInvoiceWorkflow(t *testing.T) {
// now have the settled bit toggle to true and a non-default
// SettledDate
payAmt := fakeInvoice.Terms.Value * 2
if err := db.SettleInvoice(paymentHash, payAmt); err != nil {
if _, err := db.SettleInvoice(paymentHash, payAmt); err != nil {
t.Fatalf("unable to settle invoice: %v", err)
}
dbInvoice2, err := db.LookupInvoice(paymentHash)
@@ -260,7 +260,7 @@ func TestInvoiceAddTimeSeries(t *testing.T) {
invoice.Terms.PaymentPreimage[:],
)
err := db.SettleInvoice(paymentHash, 0)
_, err := db.SettleInvoice(paymentHash, 0)
if err != nil {
t.Fatalf("unable to settle invoice: %v", err)
}