| 1141 | } |
| 1142 | |
| 1143 | static struct command_result *handle_channel_hint_update(struct command *cmd, |
| 1144 | const char *buf, |
| 1145 | const jsmntok_t *param) |
| 1146 | { |
| 1147 | struct channel_hint *hint = channel_hint_from_json(NULL, buf, param); |
| 1148 | |
| 1149 | plugin_log(cmd->plugin, LOG_DBG, |
| 1150 | "Received a channel_hint {.scid = %s, .enabled = %d, " |
| 1151 | ".estimate = %s, .capacity = %s }", |
| 1152 | fmt_short_channel_id_dir(tmpctx, &hint->scid), hint->enabled, |
| 1153 | fmt_amount_msat(tmpctx, hint->estimated_capacity), |
| 1154 | fmt_amount_msat(tmpctx, hint->capacity) |
| 1155 | ); |
| 1156 | channel_hint_set_add(global_hints, clock_time().ts.tv_sec, &hint->scid, |
| 1157 | hint->enabled, &hint->estimated_capacity, |
| 1158 | hint->capacity, NULL); |
| 1159 | tal_free(hint); |
| 1160 | return notification_handled(cmd); |
| 1161 | } |
| 1162 | |
| 1163 | static const struct plugin_command commands[] = { |
| 1164 | { |
nothing calls this directly
no test coverage detected