mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 12:21:26 +02:00
routing+channeldb: use HTLCAttempt
instead of HTLCAttemptInfo
This commit refactors the params used in lifecycle to prefer `HTLCAttempt` over `HTLCAttemptInfo`. This change is needed as `HTLCAttempt` also wraps settled and failure info, which is useful in the following commits.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
a6be939bfa
commit
20e7e801c0
@@ -38,7 +38,7 @@ func genInfo() (*PaymentCreationInfo, *HTLCAttemptInfo,
|
||||
}
|
||||
|
||||
rhash := sha256.Sum256(preimage[:])
|
||||
attempt := NewHtlcAttemptInfo(
|
||||
attempt := NewHtlcAttempt(
|
||||
0, priv, *testRoute.Copy(), time.Time{}, nil,
|
||||
)
|
||||
return &PaymentCreationInfo{
|
||||
@@ -46,7 +46,7 @@ func genInfo() (*PaymentCreationInfo, *HTLCAttemptInfo,
|
||||
Value: testRoute.ReceiverAmt(),
|
||||
CreationTime: time.Unix(time.Now().Unix(), 0),
|
||||
PaymentRequest: []byte("hola"),
|
||||
}, attempt, preimage, nil
|
||||
}, &attempt.HTLCAttemptInfo, preimage, nil
|
||||
}
|
||||
|
||||
// TestPaymentControlSwitchFail checks that payment status returns to Failed
|
||||
|
Reference in New Issue
Block a user