changed ports
authorforrest <forrest@470744a7-cac9-478e-843e-5ec1b25c69e8>
Wed, 15 Jun 2011 19:40:29 +0000 (19:40 +0000)
committerforrest <forrest@470744a7-cac9-478e-843e-5ec1b25c69e8>
Wed, 15 Jun 2011 19:40:29 +0000 (19:40 +0000)
git-svn-id: svn://forre.st/p2pool@1289 470744a7-cac9-478e-843e-5ec1b25c69e8

main.py

diff --git a/main.py b/main.py
index b7e51ae..6e18f9e 100644 (file)
--- a/main.py
+++ b/main.py
@@ -401,9 +401,7 @@ def main():
         def getBlocksCallback(chain_id, highest, contact):
             getBlocksCallback2(chain_id, highest, contact)
         
-        port = {False: 9333, True: 19333}[args.testnet] if args.p2pool_port is None else args.p2pool_port
-        print 'Joining p2pool network using TCP port %i...' % (port,)
-        
+        print 'Joining p2pool network using TCP port %i...' % (args.p2pool_port,)
         
         def parse(x):
             if ':' in x:
@@ -418,7 +416,7 @@ def main():
             nodes = [('72.14.191.28', 9333)] 
         
         p2p_node = p2p.Node(
-            port=port,
+            port=args.p2pool_port,
             testnet=args.testnet, 
             addr_store=gdbm.open(os.path.join(os.path.dirname(__file__), 'peers.dat'), 'cs'),
             mode=1 if args.low_bandwidth else 0,
@@ -521,6 +519,9 @@ if __name__ == '__main__':
     if args.bitcoind_p2p_port is None:
         args.bitcoind_p2p_port = {False: 8333, True: 18333}[args.testnet]
     
+    if args.p2pool_port is None:
+        args.p2pool_port = {False: 9333, True: 19333}[args.testnet]
+    
     net = Testnet if args.testnet else Main
     
     reactor.callWhenRunning(main)