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

Function test_write

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

Source from the content-addressed store, hash-verified

145 "969ab31b4d288cedf6218839b27a3e2140827047f2c0f01bf5c04435d43511a9";
146
147static struct io_plan *test_write(struct io_conn *conn,
148 const void *data, size_t len,
149 struct io_plan *(*next)(struct io_conn *,
150 struct handshake *),
151 struct handshake *h)
152{
153 static int upto;
154 char *got;
155
156 assert(upto < ARRAY_SIZE(expect_output));
157 got = tal_hexstr(NULL, data, len);
158 assert(streq(expect_output[upto], got));
159 tal_free(got);
160 upto++;
161
162 return next(conn, h);
163}
164
165static struct io_plan *test_read(struct io_conn *conn,
166 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