opts: Add option to register extra TLV types to accept

Incoming HTLCs are rejected by the HTLC logic if the payload contains
an even type that `lightningd` doesn't recognize. This is to prevent
us from accidentally accepting a payment that has extra semantics
attached (for example if we get a keysend payment and don't know what
to do with the TLV field containing the message we should reject it,
otherwise the overall semantics of the message delivery fail).
This commit is contained in:
Christian Decker
2021-06-17 11:52:50 +02:00
committed by neil saitug
parent 8654c817da
commit ce66466cfb

View File

@@ -1484,8 +1484,12 @@ static void add_config(struct lightningd *ld,
* --plugin for each one, so ignore these */ * --plugin for each one, so ignore these */
#if EXPERIMENTAL_FEATURES #if EXPERIMENTAL_FEATURES
} else if (opt->cb_arg == (void *)opt_set_accept_extra_tlv_types) { } else if (opt->cb_arg == (void *)opt_set_accept_extra_tlv_types) {
#endif
/* TODO Actually print the option */ /* TODO Actually print the option */
#endif
#if DEVELOPER
} else if (strstarts(name, "dev-")) {
/* Ignore dev settings */
#endif
} else { } else {
/* Insert more decodes here! */ /* Insert more decodes here! */
abort(); abort();