MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_add_local_update

Function json_add_local_update

plugins/askrene/layer.c:1176–1200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1174}
1175
1176static void json_add_local_update(struct json_stream *response,
1177 const char *fieldname,
1178 const struct local_update *lu)
1179{
1180 json_object_start(response, fieldname);
1181 json_add_short_channel_id_dir(response, "short_channel_id_dir",
1182 lu->scidd);
1183 if (lu->enabled)
1184 json_add_bool(response, "enabled", *lu->enabled);
1185 if (lu->htlc_min)
1186 json_add_amount_msat(response,
1187 "htlc_minimum_msat", *lu->htlc_min);
1188 if (lu->htlc_max)
1189 json_add_amount_msat(response,
1190 "htlc_maximum_msat", *lu->htlc_max);
1191 if (lu->base_fee)
1192 json_add_amount_msat(response, "fee_base_msat", *lu->base_fee);
1193 if (lu->proportional_fee)
1194 json_add_u32(response,
1195 "fee_proportional_millionths",
1196 *lu->proportional_fee);
1197 if (lu->delay)
1198 json_add_u32(response, "cltv_expiry_delta", *lu->delay);
1199 json_object_end(response);
1200}
1201
1202void json_add_constraint(struct json_stream *js,
1203 const char *fieldname,

Callers 1

json_add_layerFunction · 0.85

Calls 6

json_object_startFunction · 0.85
json_add_boolFunction · 0.85
json_add_amount_msatFunction · 0.85
json_add_u32Function · 0.85
json_object_endFunction · 0.85

Tested by

no test coverage detected