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

Function encoding_start

gossipd/queries.c:16–25  ·  view source on GitHub ↗

BOLT #7: * * There are several messages which contain a long array of * `short_channel_id`s (called `encoded_short_ids`) so we include an encoding * byte which allows for different encoding schemes to be defined in the future */

Source from the content-addressed store, hash-verified

14 * byte which allows for different encoding schemes to be defined in the future
15 */
16static u8 *encoding_start(const tal_t *ctx, bool prepend_encoding)
17{
18 u8 *ret;
19 if (prepend_encoding) {
20 ret = tal_arr(ctx, u8, 1);
21 ret[0] = ARR_UNCOMPRESSED;
22 } else
23 ret = tal_arr(ctx, u8, 0);
24 return ret;
25}
26
27/* Marshal a single short_channel_id */
28static void encoding_add_short_channel_id(u8 **encoded,

Callers 4

query_short_channel_idsFunction · 0.70
get_scid_arrayFunction · 0.50
test_reply_channel_rangeFunction · 0.50
get_query_flags_arrayFunction · 0.50

Calls

no outgoing calls

Tested by 3

get_scid_arrayFunction · 0.40
test_reply_channel_rangeFunction · 0.40
get_query_flags_arrayFunction · 0.40