htlcswitch: update l.clearedOnionBlobs in link to use new HtlcIndex

This commit is contained in:
Olaoluwa Osuntokun 2017-10-22 16:30:32 -07:00
parent 3b94e5df4d
commit 74165ca8c1
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -1087,8 +1087,8 @@ func (l *channelLink) processLockedInHtlcs(
case lnwallet.Add:
// Fetch the onion blob that was included within this
// processed payment descriptor.
onionBlob := l.clearedOnionBlobs[pd.Index]
delete(l.clearedOnionBlobs, pd.Index)
onionBlob := l.clearedOnionBlobs[pd.HtlcIndex]
delete(l.clearedOnionBlobs, pd.HtlcIndex)
// Retrieve onion obfuscator from onion blob in order
// to produce initial obfuscation of the onion