routing: export dbMPPayment interface

This will assist external programs attempting to re-use
ChannelRouter code and leverage the ControlTower's FetchPayment
method.
This commit is contained in:
Calvin Zachman committed 2024-08-27 19:00:58 -05:00
1 parent 1bf7ad9b43
commit 7547c234cc
3 files changed
+8 -8

No files matched your search

+4 -4
View File
@@ -9,9 +9,9 @@ import (
"github.com/lightningnetwork/lnd/queue"
)
// dbMPPayment is an interface derived from channeldb.MPPayment that is used by
// DBMPPayment is an interface derived from channeldb.MPPayment that is used by
// the payment lifecycle.
type dbMPPayment interface {
type DBMPPayment interface {
// GetState returns the current state of the payment.
GetState() *channeldb.MPPaymentState
@@ -76,7 +76,7 @@ type ControlTower interface {
// FetchPayment fetches the payment corresponding to the given payment
// hash.
FetchPayment(paymentHash lntypes.Hash) (dbMPPayment, error)
FetchPayment(paymentHash lntypes.Hash) (DBMPPayment, error)
// FailPayment transitions a payment into the Failed state, and records
// the ultimate reason the payment failed. Note that this should only
@@ -273,7 +273,7 @@ func (p *controlTower) FailAttempt(paymentHash lntypes.Hash,
// FetchPayment fetches the payment corresponding to the given payment hash.
func (p *controlTower) FetchPayment(paymentHash lntypes.Hash) (
dbMPPayment, error) {
DBMPPayment, error) {
return p.db.FetchPayment(paymentHash)
}