else:
return x, net.P2P_PORT
- nodes = set([
- ('72.14.191.28', net.P2P_PORT),
- ('62.204.197.159', net.P2P_PORT),
- ('142.58.248.28', net.P2P_PORT),
- ('94.23.34.145', net.P2P_PORT),
- ])
- for host in [
- 'p2pool.forre.st',
- 'dabuttonfactory.com',
- ] + (['liteco.in'] if net.NAME == 'litecoin' else []) + [
- ]:
+ addrs = dict((parse(addr), (0, 0, 0)) for addr in net.BOOTSTRAP_ADDRS)
+ if os.path.exists(os.path.join(datadir_path, 'addrs.txt')):
try:
- nodes.add(((yield reactor.resolve(host)), net.P2P_PORT))
+ addrs.update(dict(eval(x) for x in open(os.path.join(datadir_path, 'addrs.txt'))))
except:
- log.err(None, 'Error resolving bootstrap node IP:')
-
- addrs = {}
- try:
- addrs = dict(eval(x) for x in open(os.path.join(datadir_path, 'addrs.txt')))
- except:
- print >>sys.stderr, "error reading addrs"
+ print >>sys.stderr, "error reading addrs"
def save_addrs():
open(os.path.join(datadir_path, 'addrs.txt'), 'w').writelines(repr(x) + '\n' for x in addrs.iteritems())
port=args.p2pool_port,
net=net,
addr_store=addrs,
- preferred_addrs=set(map(parse, args.p2pool_nodes)) | nodes,
+ preferred_addrs=set(map(parse, args.p2pool_nodes)),
)
p2p_node.handle_shares = p2p_shares
p2p_node.handle_share_hashes = p2p_share_hashes
MAX_TARGET=2**256//2**32 - 1,
PERSIST=True,
WORKER_PORT=9332,
+ BOOTSTRAP_ADDRS='74.220.242.6:9334 93.97.192.93 66.90.73.83 67.83.108.0 219.84.64.174 24.167.17.248 109.74.195.142 83.211.86.49 89.78.212.44 94.23.34.145 168.7.116.243 72.14.191.28 94.174.40.189:9344'.split(' '),
)
BitcoinTestnet = math.Object(
PARENT=networks.BitcoinTestnet,
MAX_TARGET=2**256//2**32 - 1,
PERSIST=False,
WORKER_PORT=19332,
+ BOOTSTRAP_ADDRS='72.14.191.28'.split(' '),
)
NamecoinMainnet = math.Object(
MAX_TARGET=2**256//2**32 - 1,
PERSIST=True,
WORKER_PORT=9331,
+ BOOTSTRAP_ADDRS='72.14.191.28'.split(' '),
)
NamecoinTestnet = math.Object(
PARENT=networks.NamecoinTestnet,
MAX_TARGET=2**256//2**32 - 1,
PERSIST=False,
WORKER_PORT=19331,
+ BOOTSTRAP_ADDRS='72.14.191.28'.split(' '),
)
LitecoinMainnet = math.Object(
MAX_TARGET=2**256//2**20 - 1,
PERSIST=True,
WORKER_PORT=9327,
+ BOOTSTRAP_ADDRS='72.14.191.28 176.31.249.89'.split(' ')
)
LitecoinTestnet = math.Object(
PARENT=networks.LitecoinTestnet,
MAX_TARGET=2**256//2**17 - 1,
PERSIST=False,
WORKER_PORT=19327,
+ BOOTSTRAP_ADDRS='72.14.191.28 176.31.249.89'.split(' ')
)
nets=dict((net.NAME, net) for net in set([BitcoinMainnet, BitcoinTestnet, NamecoinMainnet, NamecoinTestnet, LitecoinMainnet, LitecoinTestnet]))