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

Function encoding_start

gossipd/queries.c:29–38  ·  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

27 * byte which allows for different encoding schemes to be defined in the future
28 */
29static u8 *encoding_start(const tal_t *ctx, bool prepend_encoding)
30{
31 u8 *ret;
32 if (prepend_encoding) {
33 ret = tal_arr(ctx, u8, 1);
34 ret[0] = ARR_UNCOMPRESSED;
35 } else
36 ret = tal_arr(ctx, u8, 0);
37 return ret;
38}
39
40/* Marshal a single short_channel_id */
41static void encoding_add_short_channel_id(u8 **encoded,

Callers 5

query_short_channel_idsFunction · 0.85
send_reply_channel_rangeFunction · 0.85
get_scid_arrayFunction · 0.85
test_reply_channel_rangeFunction · 0.85
get_query_flags_arrayFunction · 0.85

Calls

no outgoing calls

Tested by 3

get_scid_arrayFunction · 0.68
test_reply_channel_rangeFunction · 0.68
get_query_flags_arrayFunction · 0.68