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

Function run

tests/fuzz/fuzz-init_received.c:133–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void run(const uint8_t *data, size_t size)
134{
135 struct io_conn *conn;
136 struct crypto_state cs;
137 struct early_peer *peer;
138 u8 *encoded_msg;
139 const struct node_id id = {{
140 02,
141 00, 00, 00, 00,
142 00, 00, 00, 00,
143 00, 00, 00, 00,
144 00, 00, 00, 00,
145 00, 00, 00, 00,
146 00, 00, 00, 00,
147 00, 00, 00, 00,
148 00, 00, 00, 00 }};
149
150 encoded_msg = encode_msg(tmpctx, data, size, &cs);
151 peer = tal(tmpctx, struct early_peer);
152 peer->cs = cs;
153 peer->msg = encoded_msg;
154 peer->incoming = true;
155 peer->daemon = talz(tmpctx, struct daemon);
156 peer->timeout = NULL;
157 peer->id = id;
158
159 conn = io_new_conn(tmpctx, -1, do_nothing, NULL);
160 peer_init_received(conn, peer);
161
162 clean_tmpctx();
163}

Callers

nothing calls this directly

Calls 3

encode_msgFunction · 0.85
peer_init_receivedFunction · 0.85
clean_tmpctxFunction · 0.85

Tested by

no test coverage detected