Skip to content

Commit a895b1c

Browse files
authored
Merge pull request #9051 from calvinrzachman/export-routing-interface
routing: export dbMPPayment interface
2 parents 31a6f87 + 7547c23 commit a895b1c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

routing/control_tower.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"github.com/lightningnetwork/lnd/queue"
1010
)
1111

12-
// dbMPPayment is an interface derived from channeldb.MPPayment that is used by
12+
// DBMPPayment is an interface derived from channeldb.MPPayment that is used by
1313
// the payment lifecycle.
14-
type dbMPPayment interface {
14+
type DBMPPayment interface {
1515
// GetState returns the current state of the payment.
1616
GetState() *channeldb.MPPaymentState
1717

@@ -76,7 +76,7 @@ type ControlTower interface {
7676

7777
// FetchPayment fetches the payment corresponding to the given payment
7878
// hash.
79-
FetchPayment(paymentHash lntypes.Hash) (dbMPPayment, error)
79+
FetchPayment(paymentHash lntypes.Hash) (DBMPPayment, error)
8080

8181
// FailPayment transitions a payment into the Failed state, and records
8282
// the ultimate reason the payment failed. Note that this should only
@@ -273,7 +273,7 @@ func (p *controlTower) FailAttempt(paymentHash lntypes.Hash,
273273

274274
// FetchPayment fetches the payment corresponding to the given payment hash.
275275
func (p *controlTower) FetchPayment(paymentHash lntypes.Hash) (
276-
dbMPPayment, error) {
276+
DBMPPayment, error) {
277277

278278
return p.db.FetchPayment(paymentHash)
279279
}

routing/mock_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ func (m *mockControlTowerOld) FailPayment(phash lntypes.Hash,
508508
}
509509

510510
func (m *mockControlTowerOld) FetchPayment(phash lntypes.Hash) (
511-
dbMPPayment, error) {
511+
DBMPPayment, error) {
512512

513513
m.Lock()
514514
defer m.Unlock()
@@ -784,7 +784,7 @@ func (m *mockControlTower) FailPayment(phash lntypes.Hash,
784784
}
785785

786786
func (m *mockControlTower) FetchPayment(phash lntypes.Hash) (
787-
dbMPPayment, error) {
787+
DBMPPayment, error) {
788788

789789
args := m.Called(phash)
790790

@@ -822,7 +822,7 @@ type mockMPPayment struct {
822822
mock.Mock
823823
}
824824

825-
var _ dbMPPayment = (*mockMPPayment)(nil)
825+
var _ DBMPPayment = (*mockMPPayment)(nil)
826826

827827
func (m *mockMPPayment) GetState() *channeldb.MPPaymentState {
828828
args := m.Called()

routing/payment_lifecycle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const (
113113

114114
// decideNextStep is used to determine the next step in the payment lifecycle.
115115
func (p *paymentLifecycle) decideNextStep(
116-
payment dbMPPayment) (stateStep, error) {
116+
payment DBMPPayment) (stateStep, error) {
117117

118118
// Check whether we could make new HTLC attempts.
119119
allow, err := payment.AllowMoreAttempts()

0 commit comments

Comments
 (0)