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:
yyforyongyu
2023-03-06 17:04:44 +08:00
committed by Olaoluwa Osuntokun
parent a6be939bfa
commit 20e7e801c0
5 changed files with 30 additions and 27 deletions

View File

@@ -560,9 +560,9 @@ func genInfo() (*channeldb.PaymentCreationInfo, *channeldb.HTLCAttemptInfo,
CreationTime: time.Unix(time.Now().Unix(), 0),
PaymentRequest: []byte("hola"),
},
channeldb.NewHtlcAttemptInfo(
&channeldb.NewHtlcAttempt(
1, priv, testRoute, time.Time{}, nil,
), preimage, nil
).HTLCAttemptInfo, preimage, nil
}
func genPreimage() ([32]byte, error) {