|
|
|
|
@ -297,11 +297,13 @@ def create_sweeptxs_for_our_ctx(
|
|
|
|
|
ctn=ctn) |
|
|
|
|
for (direction, htlc), (ctx_output_idx, htlc_relative_idx) in htlc_to_ctx_output_idx_map.items(): |
|
|
|
|
if direction == RECEIVED: |
|
|
|
|
if chan.lnworker.get_payment_status(htlc.payment_hash) == PR_PAID: |
|
|
|
|
preimage = chan.lnworker.get_preimage(htlc.payment_hash) |
|
|
|
|
else: |
|
|
|
|
if chan.lnworker.is_incomplete_mpp(htlc.payment_hash): |
|
|
|
|
# do not redeem this, it might publish the preimage of an incomplete MPP |
|
|
|
|
continue |
|
|
|
|
preimage = chan.lnworker.get_preimage(htlc.payment_hash) |
|
|
|
|
if not preimage: |
|
|
|
|
# we might not have the preimage if this is a hold invoice |
|
|
|
|
continue |
|
|
|
|
else: |
|
|
|
|
preimage = None |
|
|
|
|
create_txns_for_htlc( |
|
|
|
|
|