added configuration file finders for litecoin and both testnets
authorForrest Voight <forrest@forre.st>
Wed, 1 Feb 2012 05:38:32 +0000 (00:38 -0500)
committerForrest Voight <forrest@forre.st>
Wed, 1 Feb 2012 05:38:32 +0000 (00:38 -0500)
p2pool/networks.py

index 4358cc5..c6c779c 100644 (file)
@@ -42,6 +42,7 @@ BitcoinTestnet = math.Object(
     PERSIST=False,
     WORKER_PORT=19332,
     BOOTSTRAP_ADDRS='72.14.191.28'.split(' '),
+    CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Bitcoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Bitcoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.bitcoin'), 'testnet', 'bitcoin.conf'),
 )
 
 LitecoinMainnet = math.Object(
@@ -59,6 +60,7 @@ LitecoinMainnet = math.Object(
     PERSIST=True,
     WORKER_PORT=9327,
     BOOTSTRAP_ADDRS='76.26.53.101 124.205.120.178 190.195.79.161 173.167.113.73 82.161.65.210 67.83.108.0 78.101.67.239 78.100.161.252 87.58.117.233 78.100.162.223 216.239.45.4 78.101.131.221 72.14.191.28 97.81.163.217 69.126.183.240 219.84.64.174 78.101.119.27 89.211.228.244 178.152.122.30 172.16.0.3 76.26.53.101:51319'.split(' '),
+    CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Litecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Litecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.litecoin'), 'litecoin.conf'),
 )
 LitecoinTestnet = math.Object(
     PARENT=networks.LitecoinTestnet,
@@ -75,6 +77,7 @@ LitecoinTestnet = math.Object(
     PERSIST=False,
     WORKER_PORT=19327,
     BOOTSTRAP_ADDRS='72.14.191.28'.split(' '),
+    CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Litecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Litecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.litecoin'), 'testnet', 'litecoin.conf'),
 )
 
 nets=dict((net.NAME, net) for net in set([BitcoinMainnet, BitcoinTestnet, LitecoinMainnet, LitecoinTestnet]))