| 266 | } |
| 267 | |
| 268 | WARN_UNUSED_RESULT bool amount_msat_add(struct amount_msat *val, |
| 269 | struct amount_msat a, |
| 270 | struct amount_msat b) |
| 271 | { |
| 272 | if (add_overflows_u64(a.millisatoshis, b.millisatoshis)) |
| 273 | return false; |
| 274 | |
| 275 | val->millisatoshis = a.millisatoshis + b.millisatoshis; |
| 276 | return true; |
| 277 | } |
| 278 | |
| 279 | WARN_UNUSED_RESULT bool amount_msat_accumulate(struct amount_msat *a, |
| 280 | struct amount_msat b) |