Browse Source
Merge pull request #7588 from bitromortac/2112-fix-closing-to-remote
lnpeer: fix possibly nonexistant to_remote check
patch-4
ThomasV
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
electrum/lnpeer.py
|
|
@ -1807,8 +1807,9 @@ class Peer(Logger): |
|
|
|
raise Exception('failed to verify their signature') |
|
|
|
# at this point we know how the closing tx looks like |
|
|
|
# check that their output is above their scriptpubkey's network dust limit |
|
|
|
if not drop_to_remote: |
|
|
|
to_remote_idx = closing_tx.get_output_idxs_from_scriptpubkey(their_scriptpubkey.hex()).pop() |
|
|
|
to_remote_set = closing_tx.get_output_idxs_from_scriptpubkey(their_scriptpubkey.hex()) |
|
|
|
if not drop_to_remote and to_remote_set: |
|
|
|
to_remote_idx = to_remote_set.pop() |
|
|
|
to_remote_amount = closing_tx.outputs()[to_remote_idx].value |
|
|
|
transaction.check_scriptpubkey_template_and_dust(their_scriptpubkey, to_remote_amount) |
|
|
|
|
|
|
|