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

Function file_checksum

lightningd/plugin.c:237–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237static u32 file_checksum(struct lightningd *ld, const char *path)
238{
239 char *content;
240
241 if (IFDEV(ld->dev_no_plugin_checksum, false))
242 return 0;
243
244 content = grab_file(tmpctx, path);
245 if (content == NULL) return 0;
246 return crc32c(0, content, tal_count(content));
247}
248
249struct plugin *plugin_register(struct plugins *plugins, const char* path TAKES,
250 struct plugin_command *start_cmd, bool important,

Callers 1

plugin_registerFunction · 0.85

Calls 2

grab_fileFunction · 0.85
crc32cFunction · 0.85

Tested by

no test coverage detected