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

This commit is contained in:
Olaoluwa Osuntokun committed 2017-10-22 18:36:57 -07:00
1 parent 3b94e5df4d
commit 74165ca8c1
1 file changed
+2 -2
+2 -2
View File
@@ -1087,8 +1087,8 @@ func (l *channelLink) processLockedInHtlcs(
case lnwallet.Add: case lnwallet.Add:
// Fetch the onion blob that was included within this // Fetch the onion blob that was included within this
// processed payment descriptor. // processed payment descriptor.
onionBlob := l.clearedOnionBlobs[pd.Index] onionBlob := l.clearedOnionBlobs[pd.HtlcIndex]
delete(l.clearedOnionBlobs, pd.Index) delete(l.clearedOnionBlobs, pd.HtlcIndex)
// Retrieve onion obfuscator from onion blob in order // Retrieve onion obfuscator from onion blob in order
// to produce initial obfuscation of the onion // to produce initial obfuscation of the onion