lightningd: remove support for legacy onion format.

As per proposal in https://github.com/lightning/bolts/pull/962

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: protocol: support for legacy onion format removed, since everyone supports the new one.
This commit is contained in:
Rusty Russell
2022-03-09 06:52:22 +10:30
parent 072c4711ec
commit 43a833e405
18 changed files with 197 additions and 448 deletions

View File

@@ -94,21 +94,6 @@ static bool can_carry(const struct gossmap *map,
return true;
}
static void json_add_route_hop_style(struct json_stream *response,
const char *fieldname,
enum route_hop_style style)
{
switch (style) {
case ROUTE_HOP_LEGACY:
json_add_string(response, fieldname, "legacy");
return;
case ROUTE_HOP_TLV:
json_add_string(response, fieldname, "tlv");
return;
}
abort();
}
/* Output a route hop */
static void json_add_route_hop(struct json_stream *js,
const char *fieldname,
@@ -121,7 +106,7 @@ static void json_add_route_hop(struct json_stream *js,
json_add_num(js, "direction", r->direction);
json_add_amount_msat_compat(js, r->amount, "msatoshi", "amount_msat");
json_add_num(js, "delay", r->delay);
json_add_route_hop_style(js, "style", r->style);
json_add_string(js, "style", "tlv");
json_object_end(js);
}