electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 95393656aa1deb6c92d996aa0287b90cba5bc70e
parent 3eca419ef3399c67240780f726835dbab22a85d7
Author: ThomasV <thomasv@electrum.org>
Date:   Tue,  1 Dec 2015 08:58:00 +0100

rename command: notify

Diffstat:
MRELEASE-NOTES | 2++
Mlib/commands.py | 5++---
Mlib/daemon.py | 4++--
3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/RELEASE-NOTES b/RELEASE-NOTES @@ -1,5 +1,7 @@ # Release 2.6 * separation between plugins and GUIs + * the daemon supports jsonrpc commands + * new command: 'notify <address> <url>' # Release 2.5.4 * increase MIN_RELAY_TX_FEE to avoid dust transactions diff --git a/lib/commands.py b/lib/commands.py @@ -601,7 +601,7 @@ class Commands: self.wallet.remove_payment_request(k, self.config) @command('n') - def watchaddress(self, address, URL): + def notify(self, address, URL): """Watch an address. Everytime the address changes, a http POST is sent to the URL.""" def callback(x): import urllib2 @@ -614,8 +614,7 @@ class Commands: except BaseException as e: util.print_error(str(e)) self.network.send([('blockchain.address.subscribe', [address])], callback) - return "ok" - + return True param_descriptions = { 'privkey': 'Private key. Type \'?\' to get a prompt.', diff --git a/lib/daemon.py b/lib/daemon.py @@ -75,13 +75,13 @@ class Daemon(util.DaemonThread): self.server.register_function(getattr(self.cmd_runner, cmdname), cmdname) self.server.register_function(self.run_cmdline, 'run_cmdline') self.server.register_function(self.ping, 'ping') - self.server.register_function(self.daemon, 'daemon') + self.server.register_function(self.run_daemon, 'daemon') self.server.register_function(self.run_gui, 'gui') def ping(self): return True - def daemon(self, config): + def run_daemon(self, config): sub = config.get('subcommand') assert sub in ['start', 'stop', 'status'] if sub == 'start':