Makefile: check for direct amount_sat/amount_msat access.

We need to do it in various places, but we shouldn't do it lightly:
the primitives are there to help us get overflow handling correct.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-02-21 14:15:56 +10:30
parent 28f5da7b2f
commit 38e7d19dd5
22 changed files with 51 additions and 44 deletions

View File

@@ -538,11 +538,11 @@ static void json_add_channel(struct lightningd *ld,
if (channel->funder == LOCAL) {
json_add_u64(response, pubkey_to_hexstr(tmpctx, &p->id), 0);
json_add_u64(response, pubkey_to_hexstr(tmpctx, &ld->id),
channel->funding.satoshis * 1000);
channel->funding.satoshis * 1000); /* Raw: raw JSON field */
} else {
json_add_u64(response, pubkey_to_hexstr(tmpctx, &ld->id), 0);
json_add_u64(response, pubkey_to_hexstr(tmpctx, &p->id),
channel->funding.satoshis * 1000);
channel->funding.satoshis * 1000); /* Raw: raw JSON field */
}
json_object_end(response);