diff --git a/common/sphinx.c b/common/sphinx.c index 2ca43cebe..913c0650e 100644 --- a/common/sphinx.c +++ b/common/sphinx.c @@ -486,7 +486,7 @@ static void sphinx_parse_payload(struct route_step *step, const u8 *src) hop_size = FRAME_SIZE; step->type = SPHINX_V0_PAYLOAD; } else { - vsize = varint_get(src, 3, &raw_size); + vsize = bigsize_get(src, 3, &raw_size); hop_size = raw_size + vsize + HMAC_SIZE; step->type = SPHINX_TLV_PAYLOAD; }