Browse Source

rename command: notify

283
ThomasV 9 years ago
parent
commit
95393656aa
  1. 2
      RELEASE-NOTES
  2. 5
      lib/commands.py
  3. 4
      lib/daemon.py

2
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

5
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.',

4
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':

Loading…
Cancel
Save