twatchtower: add watch_channel rpc - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 632f11d5dabd170c76c53bf2b21c518c05721621
DIR parent 39fa13b93861d324406ac58cf54047dea961ce5d
HTML Author: ThomasV <thomasv@electrum.org>
Date: Sat, 27 Oct 2018 13:51:04 +0200
watchtower: add watch_channel rpc
Diffstat:
M electrum/daemon.py | 1 +
M electrum/lnwatcher.py | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
---
DIR diff --git a/electrum/daemon.py b/electrum/daemon.py
t@@ -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()
DIR diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py
t@@ -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: