mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
offers: signatures are now optional.
As per latest spec revision. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-EXPERIMENTAL: BOLT12 offers can now be unsigned, for really short QR codes.
This commit is contained in:
@@ -481,8 +481,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (streq(hrp, "lno")) {
|
||||
const struct tlv_offer *offer
|
||||
= offer_decode_nosig(ctx, argv[2], strlen(argv[2]),
|
||||
NULL, NULL, &fail);
|
||||
= offer_decode(ctx, argv[2], strlen(argv[2]),
|
||||
NULL, NULL, &fail);
|
||||
if (!offer)
|
||||
errx(ERROR_BAD_DECODE, "Bad offer: %s", fail);
|
||||
|
||||
@@ -517,7 +517,7 @@ int main(int argc, char *argv[])
|
||||
print_features(offer->features);
|
||||
if (offer->paths)
|
||||
print_blindedpaths(offer->paths, NULL);
|
||||
if (must_have(offer, signature) && offer->node_id)
|
||||
if (offer->signature && offer->node_id)
|
||||
well_formed &= print_signature("offer", "signature",
|
||||
offer->fields,
|
||||
offer->node_id,
|
||||
|
||||
Reference in New Issue
Block a user