Skip to content

Commit 6a45294

Browse files
committed
fixup! multi: Support custom size onion packets
1 parent f01ecfd commit 6a45294

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

sphinx.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -224,24 +224,6 @@ func NewOnionPacket(paymentPath *PaymentPath, sessionKey *btcec.PrivateKey,
224224
return nil, ErrPayloadSizeExceeded
225225
}
226226

227-
// If the payload size is not equal to MaxRoutingPayloadSize, then we
228-
// check if any of the hops have a legacy payload. If so, we return an
229-
// error as legacy payloads are not supported for those payload sizes.
230-
if payloadSize != MaxRoutingPayloadSize {
231-
for i := 0; i < numHops; i++ {
232-
hopPayload := (*paymentPath)[i].HopPayload
233-
isLegacy := hopPayload.Type == PayloadLegacy
234-
235-
// For any onion size other than MaxRoutingPayloadSize,
236-
// we only expect TLV payloads.
237-
if isLegacy {
238-
return nil, fmt.Errorf("hop %d has legacy "+
239-
"payload, but this payload size "+
240-
"requires TLV,", i)
241-
}
242-
}
243-
}
244-
245227
// We'll force the caller to provide a packet filler, as otherwise we
246228
// may default to an insecure filling method (which should only really
247229
// be used to generate test vectors).

0 commit comments

Comments
 (0)