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

This commit is contained in:
Johan T. Halseth 2021-03-30 15:00:25 +02:00
parent 06f045fca3
commit e1399fb1ec
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

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
}