Merge pull request #3027 from Roasbeef/new-onion-structs
router+build: update to the latest version of lightning-onion
This commit is contained in:
14 files changed
+245
-90
No files matched your search
+15
-1
@@ -2404,10 +2404,24 @@ func (l *channelLink) processRemoteSettleFails(fwdPkg *channeldb.FwdPkg,
|
||||
outgoingHTLCID: pd.ParentIndex,
|
||||
destRef: pd.DestRef,
|
||||
htlc: &lnwire.UpdateFailHTLC{
|
||||
Reason: lnwire.OpaqueReason(pd.FailReason),
|
||||
Reason: lnwire.OpaqueReason(
|
||||
pd.FailReason,
|
||||
),
|
||||
},
|
||||
}
|
||||
|
||||
// If the failure message lacks an HMAC (but includes
|
||||
// the 4 bytes for encoding the message and padding
|
||||
// lengths, then this means that we received it as an
|
||||
// UpdateFailMalformedHTLC. As a result, we'll signal
|
||||
// that we need to convert this error within the switch
|
||||
// to an actual error, by encrypting it as if we were
|
||||
// the originating hop.
|
||||
convertedErrorSize := lnwire.FailureMessageLength + 4
|
||||
if len(pd.FailReason) == convertedErrorSize {
|
||||
failPacket.convertedError = true
|
||||
}
|
||||
|
||||
// Add the packet to the batch to be forwarded, and
|
||||
// notify the overflow queue that a spare spot has been
|
||||
// freed up within the commitment state.
|
||||
|
||||
Reference in new issue
Block a user