4 from twisted.internet import defer
7 from p2pool.util import math, pack
11 P2P_PREFIX='f9beb4d9'.decode('hex'),
15 RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
16 'bitcoinaddress' in (yield bitcoind.rpc_help()) and
17 not (yield bitcoind.rpc_getinfo())['testnet']
19 POW_FUNC=data.hash256,
22 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'), 'bitcoin.conf'),
24 bitcoin_testnet=math.Object(
25 P2P_PREFIX='fabfb5da'.decode('hex'),
29 RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
30 'bitcoinaddress' in (yield bitcoind.rpc_help()) and
31 (yield bitcoind.rpc_getinfo())['testnet']
33 POW_FUNC=data.hash256,
36 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'), 'bitcoin.conf'),
39 nameecoin=math.Object(
40 P2P_PREFIX='f9beb4fe'.decode('hex'),
44 RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
45 'namecoinaddress' in (yield bitcoind.rpc_help()) and
46 not (yield bitcoind.rpc_getinfo())['testnet']
48 POW_FUNC=data.hash256,
51 CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Namecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Namecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.namecoin'), 'bitcoin.conf'),
53 namecoin_testnet=math.Object(
54 P2P_PREFIX='fabfb5fe'.decode('hex'),
58 RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
59 'namecoinaddress' in (yield bitcoind.rpc_help()) and
60 (yield bitcoind.rpc_getinfo())['testnet']
62 POW_FUNC=data.hash256,
65 CONF_FILE_FUNC=lambda: os.path.join(os.path.join(os.environ['APPDATA'], 'Namecoin') if platform.system() == 'Windows' else os.path.expanduser('~/Library/Application Support/Namecoin/') if platform.system() == 'Darwin' else os.path.expanduser('~/.namecoin'), 'bitcoin.conf'),
69 P2P_PREFIX='fbc0b6db'.decode('hex'),
73 RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
74 'litecoinaddress' in (yield bitcoind.rpc_help()) and
75 not (yield bitcoind.rpc_getinfo())['testnet']
77 POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
80 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'),
82 litecoin_testnet=math.Object(
83 P2P_PREFIX='fcc1b7dc'.decode('hex'),
87 RPC_CHECK=defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
88 'litecoinaddress' in (yield bitcoind.rpc_help()) and
89 (yield bitcoind.rpc_getinfo())['testnet']
91 POW_FUNC=lambda data: pack.IntType(256).unpack(__import__('ltc_scrypt').getPoWHash(data)),
94 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'),