channedb/mp_payment: add Hash to individual HTLCs

For AMP payments the hash used for each HTLC will differ, and we will
need to retrive it after a restart. We therefore persist it with each
attempt.
This commit is contained in:
Johan T. Halseth
2021-03-30 14:53:29 +02:00
parent 41ae3530a3
commit 06f045fca3
4 changed files with 45 additions and 2 deletions

View File

@ -684,6 +684,7 @@ func (p *shardHandler) createNewPaymentAttempt(rt *route.Route, lastShard bool)
AttemptTime: p.router.cfg.Clock.Now(),
SessionKey: sessionKey,
Route: *rt,
Hash: &hash,
}
return firstHop, htlcAdd, attempt, nil