lnsweep: return ctx.txid instead of None
This commit is contained in:
@@ -464,8 +464,6 @@ class Channel(PrintError):
|
||||
else:
|
||||
encumbered_sweeptxs = create_sweeptxs_for_their_latest_ctx(self, ctx, self.sweep_address)
|
||||
for prev_txid, encumbered_tx in encumbered_sweeptxs:
|
||||
if prev_txid is None:
|
||||
prev_txid = ctx.txid()
|
||||
if encumbered_tx is not None:
|
||||
self.lnwatcher.add_sweep_tx(outpoint, prev_txid, encumbered_tx.to_json())
|
||||
|
||||
@@ -476,8 +474,6 @@ class Channel(PrintError):
|
||||
ctx = self.remote_commitment_to_be_revoked # FIXME can't we just reconstruct it?
|
||||
encumbered_sweeptxs = create_sweeptxs_for_their_just_revoked_ctx(self, ctx, per_commitment_secret, self.sweep_address)
|
||||
for prev_txid, encumbered_tx in encumbered_sweeptxs:
|
||||
if prev_txid is None:
|
||||
prev_txid = ctx.txid()
|
||||
if encumbered_tx is not None:
|
||||
self.lnwatcher.add_sweep_tx(outpoint, prev_txid, encumbered_tx.to_json())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user