mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
watchtower: add watch_channel rpc
This commit is contained in:
parent
09a948c448
commit
d74160bdca
2 changed files with 2 additions and 0 deletions
|
@ -131,6 +131,7 @@ class WatchTower(DaemonThread):
|
||||||
port = self.config.get('watchtower_port', 12345)
|
port = self.config.get('watchtower_port', 12345)
|
||||||
server = SimpleJSONRPCServer((host, port), logRequests=True)
|
server = SimpleJSONRPCServer((host, port), logRequests=True)
|
||||||
server.register_function(self.lnwatcher.add_sweep_tx, 'add_sweep_tx')
|
server.register_function(self.lnwatcher.add_sweep_tx, 'add_sweep_tx')
|
||||||
|
server.register_function(self.lnwatcher.watch_channel, 'watch_channel')
|
||||||
server.timeout = 0.1
|
server.timeout = 0.1
|
||||||
while self.is_running():
|
while self.is_running():
|
||||||
server.handle_request()
|
server.handle_request()
|
||||||
|
|
|
@ -95,6 +95,7 @@ class LNWatcher(PrintError):
|
||||||
storage.put('sweepstore', sweepstore)
|
storage.put('sweepstore', sweepstore)
|
||||||
storage.write()
|
storage.write()
|
||||||
|
|
||||||
|
@with_watchtower
|
||||||
def watch_channel(self, address, outpoint):
|
def watch_channel(self, address, outpoint):
|
||||||
self.watch_address(address)
|
self.watch_address(address)
|
||||||
with self.lock:
|
with self.lock:
|
||||||
|
|
Loading…
Add table
Reference in a new issue