mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-29 04:13:04 +02:00
invoices: use lntypes.Hash and lntypes.Preimage
Previously chainhash.Hash was used, which converts to/from string in reversed format. Payment hashes and preimages are supposed to be non-reversed.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package htlcswitch
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/lnpeer"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
)
|
||||
|
||||
@@ -14,11 +14,11 @@ type InvoiceDatabase interface {
|
||||
// byte payment hash. This method should also reutrn the min final CLTV
|
||||
// delta for this invoice. We'll use this to ensure that the HTLC
|
||||
// extended to us gives us enough time to settle as we prescribe.
|
||||
LookupInvoice(chainhash.Hash) (channeldb.Invoice, uint32, error)
|
||||
LookupInvoice(lntypes.Hash) (channeldb.Invoice, uint32, error)
|
||||
|
||||
// SettleInvoice attempts to mark an invoice corresponding to the
|
||||
// passed payment hash as fully settled.
|
||||
SettleInvoice(payHash chainhash.Hash, paidAmount lnwire.MilliSatoshi) error
|
||||
SettleInvoice(payHash lntypes.Hash, paidAmount lnwire.MilliSatoshi) error
|
||||
}
|
||||
|
||||
// ChannelLink is an interface which represents the subsystem for managing the
|
||||
|
Reference in New Issue
Block a user