From 72a52b0b595a7436ee0285faf27ad8e2ad26075d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 2 Jan 2018 14:17:54 +1030 Subject: [PATCH] onchaind: fix label on HTLC timeout tx. OUR_HTLC_TIMEOUT_TO_US = normal tx, used to timeout htlc in their commit tx. OUR_HTLC_TIMEOUT_TX = dual-sig tx with delay, used to timeout htlc in our commit tx. Only one test looks at that string, so fix that too. Signed-off-by: Rusty Russell --- onchaind/onchain.c | 2 +- tests/test_lightningd.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/onchaind/onchain.c b/onchaind/onchain.c index b2a90e65b..7ca33711d 100644 --- a/onchaind/onchain.c +++ b/onchaind/onchain.c @@ -1053,7 +1053,7 @@ static void resolve_our_htlc_ourcommit(struct tracked_output *out) out->wscript); propose_resolution_at_block(out, tx, out->htlc->cltv_expiry, - OUR_HTLC_TIMEOUT_TO_US); + OUR_HTLC_TIMEOUT_TX); } static void resolve_our_htlc_theircommit(struct tracked_output *out) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index aa827e866..880c072aa 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -1260,7 +1260,7 @@ class LightningDTests(BaseLightningDTests): l1.daemon.wait_for_log('Their unilateral tx, old commit point') l1.daemon.wait_for_log('-> ONCHAIND_THEIR_UNILATERAL') l2.daemon.wait_for_log('-> ONCHAIND_OUR_UNILATERAL') - l2.daemon.wait_for_logs(['Propose handling OUR_UNILATERAL/OUR_HTLC by OUR_HTLC_TIMEOUT_TO_US \\(.*\\) in 5 blocks', + l2.daemon.wait_for_logs(['Propose handling OUR_UNILATERAL/OUR_HTLC by OUR_HTLC_TIMEOUT_TX \\(.*\\) in 5 blocks', 'Propose handling OUR_UNILATERAL/DELAYED_OUTPUT_TO_US by OUR_DELAYED_RETURN_TO_WALLET .* in 5 blocks']) l1.daemon.wait_for_log('Propose handling THEIR_UNILATERAL/THEIR_HTLC by THEIR_HTLC_TIMEOUT_TO_THEM \\(IGNORING\\) in 5 blocks')