ln: use pending_local_commit while closing (won't be revoked)

This commit is contained in:
Janus 2018-07-09 23:20:12 +02:00 committed by ThomasV
parent ed62a21547
commit 55a7e4cec1

View file

@ -183,7 +183,7 @@ class LNWorker(PrintError):
# but in this case, we want the current one. So substract one ctn number
old_local_state = chan.local_state
chan.local_state=chan.local_state._replace(ctn=chan.local_state.ctn - 1)
tx = chan.local_commitment
tx = chan.pending_local_commitment
chan.local_state = old_local_state
tx.sign({bh2u(chan.local_config.multisig_key.pubkey): (chan.local_config.multisig_key.privkey, True)})
remote_sig = chan.local_state.current_commitment_signature