mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-03 02:02:17 +02:00
htlcswitch: add additional error logging during onion process failures
This commit is contained in:
@@ -169,6 +169,7 @@ func (p *OnionProcessor) DecodeHopIterator(r io.Reader, rHash []byte) (HopIterat
|
||||
case sphinx.ErrInvalidOnionKey:
|
||||
return nil, lnwire.CodeInvalidOnionKey
|
||||
default:
|
||||
log.Errorf("unable to decode onion packet: %v", err)
|
||||
return nil, lnwire.CodeTemporaryChannelFailure
|
||||
}
|
||||
}
|
||||
@@ -188,6 +189,7 @@ func (p *OnionProcessor) DecodeHopIterator(r io.Reader, rHash []byte) (HopIterat
|
||||
case sphinx.ErrInvalidOnionKey:
|
||||
return nil, lnwire.CodeInvalidOnionKey
|
||||
default:
|
||||
log.Errorf("unable to process onion packet: %v", err)
|
||||
return nil, lnwire.CodeTemporaryChannelFailure
|
||||
}
|
||||
}
|
||||
@@ -213,6 +215,7 @@ func (p *OnionProcessor) ExtractErrorEncrypter(r io.Reader) (ErrorEncrypter, lnw
|
||||
case sphinx.ErrInvalidOnionKey:
|
||||
return nil, lnwire.CodeInvalidOnionKey
|
||||
default:
|
||||
log.Errorf("unable to decode onion packet: %v", err)
|
||||
return nil, lnwire.CodeTemporaryChannelFailure
|
||||
}
|
||||
}
|
||||
@@ -228,6 +231,7 @@ func (p *OnionProcessor) ExtractErrorEncrypter(r io.Reader) (ErrorEncrypter, lnw
|
||||
case sphinx.ErrInvalidOnionKey:
|
||||
return nil, lnwire.CodeInvalidOnionKey
|
||||
default:
|
||||
log.Errorf("unable to process onion packet: %v", err)
|
||||
return nil, lnwire.CodeTemporaryChannelFailure
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user