If a node takes too much fee or cltv, the next one reports it. We don't * know who to believe, but log it */
| 1066 | /* If a node takes too much fee or cltv, the next one reports it. We don't |
| 1067 | * know who to believe, but log it */ |
| 1068 | static void report_tampering(struct payment *p, |
| 1069 | size_t report_pos, |
| 1070 | const char *style) |
| 1071 | { |
| 1072 | const struct node_id *id = &p->route[report_pos].node_id; |
| 1073 | |
| 1074 | if (report_pos == 0) { |
| 1075 | paymod_log(p, LOG_UNUSUAL, |
| 1076 | "Node #%zu (%s) claimed we sent them invalid %s", |
| 1077 | report_pos + 1, |
| 1078 | type_to_string(tmpctx, struct node_id, id), |
| 1079 | style); |
| 1080 | } else { |
| 1081 | paymod_log(p, LOG_UNUSUAL, |
| 1082 | "Node #%zu (%s) claimed #%zu (%s) sent them invalid %s", |
| 1083 | report_pos + 1, |
| 1084 | type_to_string(tmpctx, struct node_id, id), |
| 1085 | report_pos, |
| 1086 | type_to_string(tmpctx, struct node_id, |
| 1087 | &p->route[report_pos-1].node_id), |
| 1088 | style); |
| 1089 | } |
| 1090 | } |
| 1091 | |
| 1092 | static bool |
| 1093 | failure_is_blockheight_disagreement(const struct payment *p, |
no test coverage detected