htlcswitch/test: align test invoice cltv expiry

This commit is contained in:
Joost Jager
2019-04-05 11:13:52 +02:00
parent af7d0e5ff5
commit 1b2816006f
2 changed files with 10 additions and 4 deletions

View File

@@ -728,6 +728,8 @@ func newDB() (*channeldb.DB, func(), error) {
return cdb, cleanUp, nil
}
const testInvoiceCltvExpiry = 4
type mockInvoiceRegistry struct {
settleChan chan lntypes.Hash
@@ -743,7 +745,7 @@ func newMockRegistry(minDelta uint32) *mockInvoiceRegistry {
}
decodeExpiry := func(invoice string) (uint32, error) {
return 3, nil
return testInvoiceCltvExpiry, nil
}
registry := invoices.NewRegistry(cdb, decodeExpiry)