Merge pull request #5230 from carlaKC/5059-interceptorchanupdate

multi: send channel update for failed interceptor packets
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2021-04-26 15:45:43 -07:00
commit 9ef00d98a7
2 files changed
+19 -1

No files matched your search

+10 -1
View File
@@ -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)
}