routing/router: use attempt's unique hash if set on restart

This commit is contained in:
Johan T. Halseth committed 2021-04-27 09:45:13 +02:00
1 parent 06f045fca3
commit e1399fb1ec
1 file changed
+7
+7
View File
@@ -609,7 +609,14 @@ func (r *ChannelRouter) Start() error {
for _, a := range payment.HTLCs {
a := a
// We check whether the individual attempts
// have their HTLC hash set, if not we'll fall
// back to the overall payment hash.
hash := payment.Info.PaymentHash
if a.Hash != nil {
hash = *a.Hash
}
htlcs[a.AttemptID] = hash
}