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.
This commit is contained in:
niftynei
2020-12-09 16:54:20 -06:00
committed by Christian Decker
parent 90d936bb60
commit c3a387a6d8

View File

@@ -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,