Skip to content

Commit

Permalink
onchaind: fix label on HTLC timeout tx.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rustyrussell authored and cdecker committed Jan 2, 2018
1 parent fff7efa commit 72a52b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion onchaind/onchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lightningd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ def test_permfail_htlc_out(self):
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')
Expand Down

0 comments on commit 72a52b0

Please sign in to comment.