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

Function json_add_bias

plugins/askrene/layer.c:1219–1233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1217}
1218
1219void json_add_bias(struct json_stream *js,
1220 const char *fieldname,
1221 const struct bias *b,
1222 const struct layer *layer)
1223{
1224 json_object_start(js, fieldname);
1225 if (layer)
1226 json_add_string(js, "layer", layer->name);
1227 json_add_short_channel_id_dir(js, "short_channel_id_dir", b->scidd);
1228 if (b->description)
1229 json_add_string(js, "description", b->description);
1230 json_add_s64(js, "bias", b->bias);
1231 json_add_u64(js, "timestamp", b->timestamp);
1232 json_object_end(js);
1233}
1234
1235void json_add_node_bias(struct json_stream *js,
1236 const char *fieldname,

Callers 2

json_add_layerFunction · 0.85

Calls 6

json_object_startFunction · 0.85
json_add_s64Function · 0.85
json_add_u64Function · 0.85
json_object_endFunction · 0.85
json_add_stringFunction · 0.50

Tested by

no test coverage detected