| 168 | } |
| 169 | |
| 170 | struct amount_msat payment_fees(const struct payment *p) |
| 171 | { |
| 172 | assert(p); |
| 173 | struct amount_msat fees; |
| 174 | struct amount_msat sent = payment_sent(p), |
| 175 | delivered = payment_delivered(p); |
| 176 | |
| 177 | if (!amount_msat_sub(&fees, sent, delivered)) |
| 178 | plugin_err( |
| 179 | pay_plugin->plugin, |
| 180 | "Strange, sent amount (%s) is less than delivered (%s), " |
| 181 | "aborting.", |
| 182 | fmt_amount_msat(tmpctx, sent), |
| 183 | fmt_amount_msat(tmpctx, delivered)); |
| 184 | return fees; |
| 185 | } |
| 186 | |
| 187 | u64 payment_parts(const struct payment *payment) |
| 188 | { |
nothing calls this directly
no test coverage detected