rename interfaces
This commit is contained in:
parent
95a2881a8c
commit
835d2106b1
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import socket, time, interface
|
import socket, time, interface
|
||||||
|
|
||||||
i = interface.AsynchronousInterface('ecdsa.org', 50001)
|
i = interface.TcpStratumInterface('ecdsa.org', 50001)
|
||||||
i.start()
|
i.start()
|
||||||
i.send([('blockchain.numblocks.subscribe',[])])
|
i.send([('blockchain.numblocks.subscribe',[])])
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,7 @@ class NativeInterface(PollingInterface):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class HttpInterface(PollingInterface):
|
class HttpStratumInterface(PollingInterface):
|
||||||
|
|
||||||
def poll(self):
|
def poll(self):
|
||||||
self.send([])
|
self.send([])
|
||||||
|
@ -277,7 +277,7 @@ class HttpInterface(PollingInterface):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class AsynchronousInterface(Interface):
|
class TcpStratumInterface(Interface):
|
||||||
"""json-rpc over persistent TCP connection, asynchronous"""
|
"""json-rpc over persistent TCP connection, asynchronous"""
|
||||||
|
|
||||||
def __init__(self, host, port):
|
def __init__(self, host, port):
|
||||||
|
@ -420,9 +420,9 @@ class WalletSynchronizer(threading.Thread):
|
||||||
if protocol == 'n':
|
if protocol == 'n':
|
||||||
InterfaceClass = NativeInterface
|
InterfaceClass = NativeInterface
|
||||||
elif protocol == 't':
|
elif protocol == 't':
|
||||||
InterfaceClass = AsynchronousInterface
|
InterfaceClass = TcpStratumInterface
|
||||||
elif protocol == 'h':
|
elif protocol == 'h':
|
||||||
InterfaceClass = HttpInterface
|
InterfaceClass = HttpStratumInterface
|
||||||
else:
|
else:
|
||||||
print "unknown protocol"
|
print "unknown protocol"
|
||||||
InterfaceClass = NativeInterface
|
InterfaceClass = NativeInterface
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import socket, time, interface
|
import socket, time, interface
|
||||||
|
|
||||||
i = interface.AsynchronousInterface('ecdsa.org', 50001)
|
i = interface.TcpStratumInterface('ecdsa.org', 50001)
|
||||||
i.start()
|
i.start()
|
||||||
i.send([('server.peers.subscribe',[])])
|
i.send([('server.peers.subscribe',[])])
|
||||||
|
|
||||||
|
|
|
@ -230,7 +230,7 @@ def format_satoshis(x, is_diff=False):
|
||||||
|
|
||||||
|
|
||||||
from version import ELECTRUM_VERSION, SEED_VERSION
|
from version import ELECTRUM_VERSION, SEED_VERSION
|
||||||
from interface import NativeInterface, AsynchronousInterface, HttpInterface, DEFAULT_SERVERS
|
from interface import DEFAULT_SERVERS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue