From ec4db39a8ea4f1105c41b33be6f5377f74b6bb0f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 21 Feb 2017 15:15:28 +1030 Subject: [PATCH] commit_tx: print HTLC id not amount when making test vectors. For our test vectors there are two HTLCs with the same amount; this is clearer. Signed-off-by: Rusty Russell --- lightningd/commit_tx.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lightningd/commit_tx.c b/lightningd/commit_tx.c index 8bea76842..dbd79adf1 100644 --- a/lightningd/commit_tx.c +++ b/lightningd/commit_tx.c @@ -154,8 +154,8 @@ static void add_offered_htlc_out(struct bitcoin_tx *tx, size_t n, &htlc->rhash); tx->output[n].amount = htlc->msatoshi / 1000; tx->output[n].script = scriptpubkey_p2wsh(tx, wscript); - SUPERVERBOSE("# HTLC offered amount %"PRIu64" wscript %s\n", - tx->output[n].amount, tal_hex(wscript, wscript)); + SUPERVERBOSE("# HTLC %"PRIu64" offered amount %"PRIu64" wscript %s\n", + htlc->id, tx->output[n].amount, tal_hex(wscript, wscript)); tal_free(wscript); } @@ -170,9 +170,8 @@ static void add_received_htlc_out(struct bitcoin_tx *tx, size_t n, &htlc->rhash); tx->output[n].amount = htlc->msatoshi / 1000; tx->output[n].script = scriptpubkey_p2wsh(tx->output, wscript); - SUPERVERBOSE("# HTLC received amount %"PRIu64" wscript %s\n", - tx->output[n].amount, - tal_hex(wscript, wscript)); + SUPERVERBOSE("# HTLC %"PRIu64" received amount %"PRIu64" wscript %s\n", + htlc->id, tx->output[n].amount, tal_hex(wscript, wscript)); tal_free(wscript); }