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
2019-02-21 14:52:13 +01:00
parent e464ed18c7
commit aeb35d9898
3 changed files with 67 additions and 57 deletions

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
}