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

Function make_ping

common/ping.c:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

pad_encrypted_queueFunction · 0.85
send_pingFunction · 0.85
send_manual_pingFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected