Skip to content

Commit 18bf661

Browse files
committed
sphinx: use dummy secret if source node found in DecryptError
1 parent 306f18b commit 18bf661

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

obfuscation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func (o *OnionErrorDecrypter) DecryptError(encryptedData []byte) (*btcec.PublicK
182182
// secret to continue decryption attempts to fill out the rest
183183
// of the loop. Otherwise, we'll use the next shared secret in
184184
// line.
185-
if sender != nil {
185+
if sender != nil || i > len(sharedSecrets)-1 {
186186
sharedSecret = dummySecret
187187
} else {
188188
sharedSecret = sharedSecrets[i]

0 commit comments

Comments
 (0)