mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 22:36:16 +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:
|
case sphinx.ErrInvalidOnionKey:
|
||||||
return nil, lnwire.CodeInvalidOnionKey
|
return nil, lnwire.CodeInvalidOnionKey
|
||||||
default:
|
default:
|
||||||
|
log.Errorf("unable to decode onion packet: %v", err)
|
||||||
return nil, lnwire.CodeTemporaryChannelFailure
|
return nil, lnwire.CodeTemporaryChannelFailure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,6 +189,7 @@ func (p *OnionProcessor) DecodeHopIterator(r io.Reader, rHash []byte) (HopIterat
|
|||||||
case sphinx.ErrInvalidOnionKey:
|
case sphinx.ErrInvalidOnionKey:
|
||||||
return nil, lnwire.CodeInvalidOnionKey
|
return nil, lnwire.CodeInvalidOnionKey
|
||||||
default:
|
default:
|
||||||
|
log.Errorf("unable to process onion packet: %v", err)
|
||||||
return nil, lnwire.CodeTemporaryChannelFailure
|
return nil, lnwire.CodeTemporaryChannelFailure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -213,6 +215,7 @@ func (p *OnionProcessor) ExtractErrorEncrypter(r io.Reader) (ErrorEncrypter, lnw
|
|||||||
case sphinx.ErrInvalidOnionKey:
|
case sphinx.ErrInvalidOnionKey:
|
||||||
return nil, lnwire.CodeInvalidOnionKey
|
return nil, lnwire.CodeInvalidOnionKey
|
||||||
default:
|
default:
|
||||||
|
log.Errorf("unable to decode onion packet: %v", err)
|
||||||
return nil, lnwire.CodeTemporaryChannelFailure
|
return nil, lnwire.CodeTemporaryChannelFailure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -228,6 +231,7 @@ func (p *OnionProcessor) ExtractErrorEncrypter(r io.Reader) (ErrorEncrypter, lnw
|
|||||||
case sphinx.ErrInvalidOnionKey:
|
case sphinx.ErrInvalidOnionKey:
|
||||||
return nil, lnwire.CodeInvalidOnionKey
|
return nil, lnwire.CodeInvalidOnionKey
|
||||||
default:
|
default:
|
||||||
|
log.Errorf("unable to process onion packet: %v", err)
|
||||||
return nil, lnwire.CodeTemporaryChannelFailure
|
return nil, lnwire.CodeTemporaryChannelFailure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user