mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-10 08:34:19 +01:00
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:
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
|
||||
tal_hexstr(ctx, &b11->payment_hash, sizeof(b11->payment_hash)));
|
||||
printf("min_final_cltv_expiry: %u\n", b11->min_final_cltv_expiry);
|
||||
if (b11->msat) {
|
||||
printf("msatoshi: %"PRIu64"\n", b11->msat->millisatoshis);
|
||||
printf("msatoshi: %"PRIu64"\n", b11->msat->millisatoshis); /* Raw: raw int for backwards compat */
|
||||
printf("amount_msat: %s\n",
|
||||
type_to_string(tmpctx, struct amount_msat, b11->msat));
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ static void do_generate(int argc, char **argv)
|
||||
hops_data[i].realm = i;
|
||||
memset(&hops_data[i].channel_id, i,
|
||||
sizeof(hops_data[i].channel_id));
|
||||
hops_data[i].amt_forward.millisatoshis = i;
|
||||
hops_data[i].amt_forward.millisatoshis = i; /* Raw: test code */
|
||||
hops_data[i].outgoing_cltv = i;
|
||||
fprintf(stderr, "Hopdata %d: %s\n", i, tal_hexstr(NULL, &hops_data[i], sizeof(hops_data[i])));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user