You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Onion messages allow for payloads that exceed 1300 bytes, in which case
the payload should become 32768 bytes. This commit introduces support
for those custom size packets and the tests for this feature.
NewOnionPacket now allows for a final variadic argument payloadSizes.
The sizes passed are then compared to the actual payload size of the
entire path, and the first value that fits the actual payload size will
then be used as the size of the routing info. We use this to fix the
size of onion messages at 1300 or 32768 bytes as suggested by BOLT-0004
but it can be used to fix the size at any value. If no values are passed
the func defaults to MaxRoutingPayloadSize.
MaxRoutingPayloadSize and MaxOnionMessagePayloadSize are exposed to
facilitate easy usage of this library.
sphinx_test now has a helper function to create onion messages of a
specified length. This helper is then used to test the handling of
packets larger than 1300 bytes specifically for onion messages.
0 commit comments