When I noticed that we were adding "XXXmsat" fields *not* ending in _msat */
| 600 | |
| 601 | /* When I noticed that we were adding "XXXmsat" fields *not* ending in _msat */ |
| 602 | void json_add_amount_sats_deprecated(struct json_stream *result, |
| 603 | const char *fieldname, |
| 604 | const char *msatfieldname, |
| 605 | struct amount_sat sat) |
| 606 | { |
| 607 | if (deprecated_apis) { |
| 608 | struct amount_msat msat; |
| 609 | assert(!strends(fieldname, "_msat")); |
| 610 | if (amount_sat_to_msat(&msat, sat)) |
| 611 | json_add_string(result, fieldname, |
| 612 | take(fmt_amount_msat(NULL, msat))); |
| 613 | } |
| 614 | json_add_amount_sat_msat(result, msatfieldname, sat); |
| 615 | } |
| 616 | |
| 617 | void json_add_sats(struct json_stream *result, |
| 618 | const char *fieldname, |
no test coverage detected