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

Function make_ping

common/ping.c:46–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46u8 *make_ping(const tal_t *ctx, u16 num_pong_bytes, u16 padlen)
47{
48 /* BOLT #1:
49 *
50 * A node sending a `ping` message:
51 * - SHOULD set `ignored` to 0s.
52 * - MUST NOT set `ignored` to sensitive data such as secrets or
53 * portions of initialized memory.
54 */
55 u8 *ping, *ignored = tal_arrz(ctx, u8, padlen);
56
57 ping = towire_ping(ctx, num_pong_bytes, ignored);
58 tal_free(ignored);
59 return ping;
60}

Callers 2

send_pingFunction · 0.85
send_manual_pingFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected