multi: use separate cltv expiry field from invoice
Now that the Invoice struct contains the decoded final cltv delta value, the decoding of payment requests can be removed from the invoice registry.
This commit is contained in:
12 files changed
+34
-83
No files matched your search
+4
-6
@@ -768,13 +768,9 @@ func newMockRegistry(minDelta uint32) *mockInvoiceRegistry {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
decodeExpiry := func(invoice string) (uint32, error) {
|
||||
return testInvoiceCltvExpiry, nil
|
||||
}
|
||||
|
||||
finalCltvRejectDelta := int32(5)
|
||||
|
||||
registry := invoices.NewRegistry(cdb, decodeExpiry, finalCltvRejectDelta)
|
||||
registry := invoices.NewRegistry(cdb, finalCltvRejectDelta)
|
||||
registry.Start()
|
||||
|
||||
return &mockInvoiceRegistry{
|
||||
@@ -783,7 +779,9 @@ func newMockRegistry(minDelta uint32) *mockInvoiceRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
func (i *mockInvoiceRegistry) LookupInvoice(rHash lntypes.Hash) (channeldb.Invoice, uint32, error) {
|
||||
func (i *mockInvoiceRegistry) LookupInvoice(rHash lntypes.Hash) (
|
||||
channeldb.Invoice, error) {
|
||||
|
||||
return i.registry.LookupInvoice(rHash)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user