Skip to content

Commit ec4db39

Browse files
committed
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 <rusty@rustcorp.com.au>
1 parent 9284819 commit ec4db39

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lightningd/commit_tx.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ static void add_offered_htlc_out(struct bitcoin_tx *tx, size_t n,
154154
&htlc->rhash);
155155
tx->output[n].amount = htlc->msatoshi / 1000;
156156
tx->output[n].script = scriptpubkey_p2wsh(tx, wscript);
157-
SUPERVERBOSE("# HTLC offered amount %"PRIu64" wscript %s\n",
158-
tx->output[n].amount, tal_hex(wscript, wscript));
157+
SUPERVERBOSE("# HTLC %"PRIu64" offered amount %"PRIu64" wscript %s\n",
158+
htlc->id, tx->output[n].amount, tal_hex(wscript, wscript));
159159
tal_free(wscript);
160160
}
161161

@@ -170,9 +170,8 @@ static void add_received_htlc_out(struct bitcoin_tx *tx, size_t n,
170170
&htlc->rhash);
171171
tx->output[n].amount = htlc->msatoshi / 1000;
172172
tx->output[n].script = scriptpubkey_p2wsh(tx->output, wscript);
173-
SUPERVERBOSE("# HTLC received amount %"PRIu64" wscript %s\n",
174-
tx->output[n].amount,
175-
tal_hex(wscript, wscript));
173+
SUPERVERBOSE("# HTLC %"PRIu64" received amount %"PRIu64" wscript %s\n",
174+
htlc->id, tx->output[n].amount, tal_hex(wscript, wscript));
176175
tal_free(wscript);
177176
}
178177

0 commit comments

Comments
 (0)