lnsweep: sweep_our_ctx was returning redundant objects
This commit is contained in:
@@ -273,7 +273,7 @@ def sweep_our_htlctx(
|
|||||||
def sweep_our_ctx(
|
def sweep_our_ctx(
|
||||||
*, chan: 'AbstractChannel',
|
*, chan: 'AbstractChannel',
|
||||||
ctx: Transaction,
|
ctx: Transaction,
|
||||||
actual_htlc_tx: Transaction=None, # if passed, second stage
|
actual_htlc_tx: Transaction=None, # if passed, return second stage htlcs
|
||||||
) -> Dict[str, SweepInfo]:
|
) -> Dict[str, SweepInfo]:
|
||||||
|
|
||||||
"""Handle the case where we force-close unilaterally with our latest ctx.
|
"""Handle the case where we force-close unilaterally with our latest ctx.
|
||||||
@@ -324,7 +324,7 @@ def sweep_our_ctx(
|
|||||||
txs = {} # type: Dict[str, SweepInfo]
|
txs = {} # type: Dict[str, SweepInfo]
|
||||||
|
|
||||||
# local anchor
|
# local anchor
|
||||||
if chan.has_anchors():
|
if actual_htlc_tx is None and chan.has_anchors():
|
||||||
if txin := sweep_ctx_anchor(ctx=ctx, multisig_key=our_conf.multisig_key):
|
if txin := sweep_ctx_anchor(ctx=ctx, multisig_key=our_conf.multisig_key):
|
||||||
txs[txin.prevout.to_str()] = SweepInfo(
|
txs[txin.prevout.to_str()] = SweepInfo(
|
||||||
name='local_anchor',
|
name='local_anchor',
|
||||||
|
|||||||
Reference in New Issue
Block a user