| 1181 | } |
| 1182 | |
| 1183 | bool jsonrpc_command_add(struct jsonrpc *rpc, struct json_command *command, |
| 1184 | const char *usage TAKES) |
| 1185 | { |
| 1186 | if (!command_add(rpc, command)) |
| 1187 | return false; |
| 1188 | usage = tal_strdup(command, usage); |
| 1189 | strmap_add(&rpc->usagemap, command->name, usage); |
| 1190 | tal_add_destructor2(command, destroy_json_command, rpc); |
| 1191 | return true; |
| 1192 | } |
| 1193 | |
| 1194 | static bool jsonrpc_command_add_perm(struct lightningd *ld, |
| 1195 | struct jsonrpc *rpc, |
no test coverage detected