electrum

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

commit 5f733a43122419ccc73684639641f49d0c878774
parent f8ce5b65df4b36cf802915cd9a09e482de456d99
Author: ThomasV <thomasv@gitorious>
Date:   Thu, 17 May 2012 20:26:37 +0200

add init_socket to scripts

Diffstat:
Mblocks | 4+++-
Mwatch_address | 1+
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/blocks b/blocks @@ -3,9 +3,11 @@ from electrum import TcpStratumInterface i = TcpStratumInterface('ecdsa.org', 50001) +i.init_socket() i.start() i.send([('blockchain.numblocks.subscribe',[])]) while True: r = i.responses.get(True, 100000000000) - print r.get('result') + if r.get('method') == 'blockchain.numblocks.subscribe': + print r.get('result') diff --git a/watch_address b/watch_address @@ -9,6 +9,7 @@ except: print "usage: watch_address <bitcoin_address>" i = TcpStratumInterface('ecdsa.org', 50001) +i.init_socket() i.start() i.send([('blockchain.address.subscribe',[addr])])