1
0

Merge the network and network_proxy

This commit is contained in:
Neil Booth
2015-08-30 21:18:10 +09:00
parent 4d6a0f29ee
commit 2d05e7d891
14 changed files with 158 additions and 319 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
import sys
from electrum import NetworkProxy, print_json
from electrum import Network, print_json
try:
addr = sys.argv[1]
@@ -9,8 +9,7 @@ except Exception:
print "usage: get_history <bitcoin_address>"
sys.exit(1)
n = NetworkProxy()
n.start(start_daemon=True)
h = n.synchronous_get([ ('blockchain.address.get_history',[addr]) ])[0]
n = Network()
n.start()
h = n.synchronous_get(('blockchain.address.get_history',[addr]))
print_json(h)