mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 18:10:48 +02:00
multi: send channel update for failed interceptor packets
This commit is contained in:
@ -139,7 +139,16 @@ func (f *interceptedForward) Resume() error {
|
||||
|
||||
// Fail forward a failed packet to the switch.
|
||||
func (f *interceptedForward) Fail() error {
|
||||
reason, err := f.packet.obfuscator.EncryptFirstHop(lnwire.NewTemporaryChannelFailure(nil))
|
||||
update, err := f.htlcSwitch.cfg.FetchLastChannelUpdate(
|
||||
f.packet.incomingChanID,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
reason, err := f.packet.obfuscator.EncryptFirstHop(
|
||||
lnwire.NewTemporaryChannelFailure(update),
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to encrypt failure reason %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user