Browse Source

bolt11: fix encoding of routes of length > 1.

We don't do this yet, so it went unnoticed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
plugin-timeout-inc
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
0bcad1289e
  1. 2
      common/bolt11.c

2
common/bolt11.c

@ -843,7 +843,7 @@ static void encode_r(u5 **data, const struct route_info *r)
u8 *rinfo = tal_arr(NULL, u8, 0);
for (size_t i = 0; i < tal_count(r); i++)
towire_route_info(&rinfo, r);
towire_route_info(&rinfo, &r[i]);
push_field(data, 'r', rinfo, tal_count(rinfo) * CHAR_BIT);
tal_free(rinfo);

Loading…
Cancel
Save