If a node takes too much fee or cltv, the next one reports it. We don't * know who to believe, but log it */
| 1220 | /* If a node takes too much fee or cltv, the next one reports it. We don't |
| 1221 | * know who to believe, but log it */ |
| 1222 | static void report_tampering(struct payment *p, |
| 1223 | size_t report_pos, |
| 1224 | const char *style) |
| 1225 | { |
| 1226 | const struct node_id *id = &p->route[report_pos].node_id; |
| 1227 | |
| 1228 | if (report_pos == 0) { |
| 1229 | paymod_log(p, LOG_UNUSUAL, |
| 1230 | "Node #%zu (%s) claimed we sent them invalid %s", |
| 1231 | report_pos + 1, |
| 1232 | fmt_node_id(tmpctx, id), |
| 1233 | style); |
| 1234 | } else { |
| 1235 | paymod_log(p, LOG_UNUSUAL, |
| 1236 | "Node #%zu (%s) claimed #%zu (%s) sent them invalid %s", |
| 1237 | report_pos + 1, |
| 1238 | fmt_node_id(tmpctx, id), |
| 1239 | report_pos, |
| 1240 | fmt_node_id(tmpctx, &p->route[report_pos-1].node_id), |
| 1241 | style); |
| 1242 | } |
| 1243 | } |
| 1244 | |
| 1245 | static bool |
| 1246 | failure_is_blockheight_disagreement(const struct payment *p, |
no test coverage detected