electrum

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

commit 49c422db673f91632733cf2b45d521315becaf2f
parent fe142452e2faf4c09218686cd90202ed83d6488a
Author: ThomasV <thomasv@gitorious>
Date:   Wed, 28 Mar 2012 23:02:33 +0200

new syntax

Diffstat:
Mclient/blocks | 2+-
Mclient/interface.py | 14+++++++-------
Mclient/wallet.py | 10+++++-----
3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/client/blocks b/client/blocks @@ -4,7 +4,7 @@ import socket, time, interface i = interface.AsynchronousInterface('ecdsa.org', 50001) i.start() -i.send([('numblocks.subscribe',[])]) +i.send([('blockchain.numblocks.subscribe',[])]) while True: r = i.responses.get(True, 100000000000) diff --git a/client/interface.py b/client/interface.py @@ -69,11 +69,11 @@ class Interface: def update_waiting_lists(self, method, params): - if method == 'address.subscribe': + if method == 'blockchain.address.subscribe': addr = params[-1] if addr in self.addresses_waiting_for_status: self.addresses_waiting_for_status.remove(addr) - elif method == 'address.get_history': + elif method == 'blockchain.address.get_history': addr = params[0] if addr in self.addresses_waiting_for_history: self.addresses_waiting_for_history.remove(addr) @@ -82,7 +82,7 @@ class Interface: def subscribe(self, addresses): messages = [] for addr in addresses: - messages.append(('address.subscribe', [addr])) + messages.append(('blockchain.address.subscribe', [addr])) self.addresses_waiting_for_status.append(addr) self.send(messages) @@ -111,7 +111,7 @@ class Interface: def start_session(self, addresses, version): #print "Starting new session: %s:%d"%(self.host,self.port) self.start() - self.send([('client.version', [version]), ('server.banner',[]), ('numblocks.subscribe',[]), ('server.peers',[])]) + self.send([('client.version', [version]), ('server.banner',[]), ('blockchain.numblocks.subscribe',[]), ('server.peers.subscribe',[])]) self.subscribe(addresses) @@ -167,9 +167,9 @@ class NativeInterface(PollingInterface): cmds = {'session.new':'new_session', 'server.peers':'peers', 'session.poll':'poll', - 'transaction.broadcast':'tx', - 'address.get_history':'h', - 'address.subscribe':'address.subscribe' + 'blockchain.transaction.broadcast':'tx', + 'blockchain.address.get_history':'h', + 'blockchain.address.subscribe':'address.subscribe' } for m in messages: diff --git a/client/wallet.py b/client/wallet.py @@ -935,23 +935,23 @@ class Wallet: for addr, status in changed_addresses.items(): self.receive_status_callback(addr, status) - elif method == 'server.peers': + elif method == 'server.peers.subscribe': self.interface.servers = map( lambda x:x[1], result ) - elif method == 'address.subscribe': + elif method == 'blockchain.address.subscribe': addr = params[-1] self.receive_status_callback(addr, result) - elif method == 'address.get_history': + elif method == 'blockchain.address.get_history': addr = params[0] self.receive_history_callback(addr, result) self.was_updated = True - elif method == 'transaction.broadcast': + elif method == 'blockchain.transaction.broadcast': self.tx_result = result self.tx_event.set() - elif method == 'numblocks.subscribe': + elif method == 'blockchain.numblocks.subscribe': self.blocks = result elif method == 'client.version':