| 235 | } |
| 236 | |
| 237 | static 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 | |
| 249 | struct plugin *plugin_register(struct plugins *plugins, const char* path TAKES, |
| 250 | struct plugin_command *start_cmd, bool important, |
no test coverage detected