1
0

add watchtower class, send encumbered tx as json

This commit is contained in:
ThomasV
2018-10-13 12:11:10 +02:00
parent 7589bdc6a9
commit e761f5b876
3 changed files with 24 additions and 12 deletions

View File

@@ -343,7 +343,7 @@ class Channel(PrintError):
else:
their_cur_pcp = self.config[REMOTE].next_per_commitment_point
encumbered_sweeptx = maybe_create_sweeptx_for_their_ctx_to_remote(self, ctx, their_cur_pcp, self.sweep_address)
self.lnwatcher.add_sweep_tx(outpoint, ctx.txid(), encumbered_sweeptx)
self.lnwatcher.add_sweep_tx(outpoint, ctx.txid(), encumbered_sweeptx.to_json())
def process_new_revocation_secret(self, per_commitment_secret: bytes):
if not self.lnwatcher:
@@ -351,7 +351,7 @@ class Channel(PrintError):
outpoint = self.funding_outpoint.to_str()
ctx = self.remote_commitment_to_be_revoked
encumbered_sweeptx = maybe_create_sweeptx_for_their_ctx_to_local(self, ctx, per_commitment_secret, self.sweep_address)
self.lnwatcher.add_sweep_tx(outpoint, ctx.txid(), encumbered_sweeptx)
self.lnwatcher.add_sweep_tx(outpoint, ctx.txid(), encumbered_sweeptx.to_json())
def receive_revocation(self, revocation):
"""