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:
3 files changed
+67
-57
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user