From c3a387a6d8eb6d14de77bcb6c270ac0b9c72eaa1 Mon Sep 17 00:00:00 2001 From: niftynei Date: Wed, 9 Dec 2020 16:54:20 -0600 Subject: [PATCH] dual-fund: use correct 'last_tx' We were incorrectly saving the *remote's* commitment transaction as the 'last_tx' for a peer, not our own local one. When we applied the 'remote_commit_sig' to it, it would fail since the remote's signature doesn't validate for their commitment transaction. --- openingd/dualopend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openingd/dualopend.c b/openingd/dualopend.c index dcce958d4..83687cce4 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -1765,7 +1765,7 @@ static void accepter_start(struct state *state, const u8 *oc2_msg) * then wait to get our sigs back */ msg = towire_dualopend_commit_rcvd(state, &state->remoteconf, - remote_commit, + local_commit, pbase, &remote_sig, state->psbt, @@ -2209,7 +2209,7 @@ static void opener_start(struct state *state, u8 *msg) msg = towire_dualopend_commit_rcvd(NULL, &state->remoteconf, - remote_commit, + local_commit, pbase, &remote_sig, state->psbt,