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

Function json_add_bias

plugins/askrene/layer.c:1248–1262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246}
1247
1248void json_add_bias(struct json_stream *js,
1249 const char *fieldname,
1250 const struct bias *b,
1251 const struct layer *layer)
1252{
1253 json_object_start(js, fieldname);
1254 if (layer)
1255 json_add_string(js, "layer", layer->name);
1256 json_add_short_channel_id_dir(js, "short_channel_id_dir", b->scidd);
1257 if (b->description)
1258 json_add_string(js, "description", b->description);
1259 json_add_s64(js, "bias", b->bias);
1260 json_add_u64(js, "timestamp", b->timestamp);
1261 json_object_end(js);
1262}
1263
1264void json_add_node_bias(struct json_stream *js,
1265 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