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

Function test_write

connectd/test/run-responder-success.c:241–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239 "969ab31b4d288cedf6218839b27a3e2140827047f2c0f01bf5c04435d43511a9";
240
241static struct io_plan *test_write(struct io_conn *conn,
242 const void *data, size_t len,
243 struct io_plan *(*next)(struct io_conn *,
244 struct handshake *),
245 struct handshake *h)
246{
247 static int upto;
248 char *got;
249
250 assert(upto < ARRAY_SIZE(expect_output));
251 got = tal_hexstr(NULL, data, len);
252 assert(streq(expect_output[upto], got));
253 tal_free(got);
254 upto++;
255
256 return next(conn, h);
257}
258
259static struct io_plan *test_read(struct io_conn *conn,
260 void *data, size_t len,

Callers

nothing calls this directly

Calls 3

tal_hexstrFunction · 0.85
tal_freeFunction · 0.85
nextFunction · 0.85

Tested by

no test coverage detected