use set instead of list in memorypool_update
[electrum-server.git] / server.py
index 4d347e7..d41bcf3 100755 (executable)
--- a/server.py
+++ b/server.py
@@ -90,7 +90,11 @@ def run_rpc_command(command, stratum_tcp_port):
         return
 
     method = 'server.' + command
-    request = json.dumps({'id': 0, 'method': method, 'params': [password]})
+    params = [password]
+    if len(sys.argv) > 2:
+        params.append(sys.argv[2])
+    
+    request = json.dumps({'id': 0, 'method': method, 'params': params})
     s.send(request + '\n')
     msg = ''
     while True:
@@ -104,9 +108,9 @@ def run_rpc_command(command, stratum_tcp_port):
 
     if command == 'info':
         now = time.time()
-        print 'type           address   sub  version  time'
+        print 'type           address         sub  version  time'
         for item in r:
-            print '%4s   %15s   %3s  %7s  %.2f' % (item.get('name'),
+            print '%4s   %21s   %3s  %7s  %.2f' % (item.get('name'),
                                                    item.get('address'),
                                                    item.get('subscriptions'),
                                                    item.get('version'),
@@ -138,9 +142,7 @@ if __name__ == '__main__':
     from backends.irc import ServerProcessor
 
     backend_name = config.get('server', 'backend')
-    if backend_name == 'abe':
-        from backends.abe import BlockchainProcessor
-    elif backend_name == 'libbitcoin':
+    if backend_name == 'libbitcoin':
         from backends.libbitcoin import BlockchainProcessor
     elif backend_name == 'leveldb':
         from backends.bitcoind import BlockchainProcessor