mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 14:17:56 +01:00
multi: move DBMPPayment to paymentsdb package
This commit is contained in:
@@ -130,7 +130,7 @@ const (
|
||||
// wait for results, the method will exit with `stepExit` such that the payment
|
||||
// lifecycle loop will terminate.
|
||||
func (p *paymentLifecycle) decideNextStep(
|
||||
payment DBMPPayment) (stateStep, error) {
|
||||
payment paymentsdb.DBMPPayment) (stateStep, error) {
|
||||
|
||||
// Check whether we could make new HTLC attempts.
|
||||
allow, err := payment.AllowMoreAttempts()
|
||||
@@ -1110,7 +1110,9 @@ func (p *paymentLifecycle) patchLegacyPaymentHash(
|
||||
// reloadInflightAttempts is called when the payment lifecycle is resumed after
|
||||
// a restart. It reloads all inflight attempts from the control tower and
|
||||
// collects the results of the attempts that have been sent before.
|
||||
func (p *paymentLifecycle) reloadInflightAttempts() (DBMPPayment, error) {
|
||||
func (p *paymentLifecycle) reloadInflightAttempts() (paymentsdb.DBMPPayment,
|
||||
error) {
|
||||
|
||||
payment, err := p.router.cfg.Control.FetchPayment(p.identifier)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -1133,7 +1135,7 @@ func (p *paymentLifecycle) reloadInflightAttempts() (DBMPPayment, error) {
|
||||
}
|
||||
|
||||
// reloadPayment returns the latest payment found in the db (control tower).
|
||||
func (p *paymentLifecycle) reloadPayment() (DBMPPayment,
|
||||
func (p *paymentLifecycle) reloadPayment() (paymentsdb.DBMPPayment,
|
||||
*paymentsdb.MPPaymentState, error) {
|
||||
|
||||
// Read the db to get the latest state of the payment.
|
||||
|
||||
Reference in New Issue
Block a user