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

Function test_read

cli/test/run-human-mode.c:74–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72static size_t response_off, max_read_return;
73
74ssize_t test_read(int fd UNUSED, void *buf, size_t len)
75{
76 if (len > max_read_return)
77 len = max_read_return;
78 if (len > strlen(response + response_off))
79 len = strlen(response + response_off);
80
81 memcpy(buf, response + response_off, len);
82 response_off += len;
83 return len;
84}
85
86int main(int argc UNUSED, char *argv[])
87{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected