htlcswitch/test: use real invoice registry with temp db as mock

In further commits the behaviour of invoice registry becomes more
intrinsically connected to the link. This commit prepares for that by
allowing link and registry to be tested as a single unit.
This commit is contained in:
Joost Jager committed 2019-03-15 10:09:12 +01:00
1 parent e464ed18c7
commit aeb35d9898
3 files changed
+67 -57

No files matched your search

+1 -1
View File
@@ -742,7 +742,7 @@ func preparePayment(sendingPeer, receivingPeer lnpeer.Peer,
}
// Check who is last in the route and add invoice to server registry.
if err := receiver.registry.AddInvoice(*invoice); err != nil {
if err := receiver.registry.AddInvoice(*invoice, htlc.PaymentHash); err != nil {
return nil, nil, err
}