Browse Source

Revert "bolt11: better message when you try to 'lightning-cli pay' an onchain addr."

This reverts commit 6af8f29392.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
trytravis
Rusty Russell 6 years ago
parent
commit
33c21d8a98
  1. 8
      common/bolt11.c

8
common/bolt11.c

@ -467,11 +467,11 @@ struct bolt11 *bolt11_decode(const tal_t *ctx, const char *str,
b11->routes = tal_arr(b11, struct route_info *, 0);
if (!strstarts(str, "ln"))
return decode_fail(b11, fail, "Invoices must start with ln");
if (strlen(str) < 8)
return decode_fail(b11, fail, "Bad bech32 string");
hrp = tal_arr(tmpctx, char, strlen(str));
data = tal_arr(tmpctx, u5, strlen(str));
hrp = tal_arr(tmpctx, char, strlen(str) - 6);
data = tal_arr(tmpctx, u5, strlen(str) - 8);
if (!bech32_decode(hrp, data, &data_len, str, (size_t)-1))
return decode_fail(b11, fail, "Bad bech32 string");

Loading…
Cancel
Save