Browse Source

watchtower: add watch_channel rpc

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
ThomasV 6 years ago
parent
commit
632f11d5da
  1. 1
      electrum/daemon.py
  2. 1
      electrum/lnwatcher.py

1
electrum/daemon.py

@ -135,6 +135,7 @@ class WatchTower(DaemonThread):
port = self.config.get('watchtower_port', 12345)
server = SimpleJSONRPCServer((host, port), logRequests=True)
server.register_function(self.lnwatcher.add_sweep_tx, 'add_sweep_tx')
server.register_function(self.lnwatcher.watch_channel, 'watch_channel')
server.timeout = 0.1
while self.is_running():
server.handle_request()

1
electrum/lnwatcher.py

@ -95,6 +95,7 @@ class LNWatcher(PrintError):
storage.put('sweepstore', sweepstore)
storage.write()
@with_watchtower
def watch_channel(self, address, outpoint):
self.watch_address(address)
with self.lock:

Loading…
Cancel
Save