removed i0coin, ixcoin, solidcoin network definitions
[p2pool.git] / p2pool / bitcoin / networks.py
1 from twisted.internet import defer
2
3 from . import data
4
5
6 class BitcoinMainnet(object):
7     BITCOIN_P2P_PREFIX = 'f9beb4d9'.decode('hex')
8     BITCOIN_P2P_PORT = 8333
9     BITCOIN_ADDRESS_VERSION = 0
10     BITCOIN_RPC_PORT = 8332
11     BITCOIN_RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
12         'name_firstupdate' not in (yield bitcoind.rpc_help()) and
13         'ixcoinaddress' not in (yield bitcoind.rpc_help()) and
14         not (yield bitcoind.rpc_getinfo())['testnet']
15     )))
16     BITCOIN_SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//210000)
17     BITCOIN_POW_FUNC = data.block_header_type.hash256
18     BITCOIN_SYMBOL = 'BTC'
19
20 class BitcoinTestnet(object):
21     BITCOIN_P2P_PREFIX = 'fabfb5da'.decode('hex')
22     BITCOIN_P2P_PORT = 18333
23     BITCOIN_ADDRESS_VERSION = 111
24     BITCOIN_RPC_PORT = 8332
25     BITCOIN_RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
26         'name_firstupdate' not in (yield bitcoind.rpc_help()) and
27         'ixcoinaddress' not in (yield bitcoind.rpc_help()) and
28         (yield bitcoind.rpc_getinfo())['testnet']
29     )))
30     BITCOIN_SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//210000)
31     BITCOIN_POW_FUNC = data.block_header_type.hash256
32     BITCOIN_SYMBOL = 'tBTC'
33
34
35 class NamecoinMainnet(object):
36     BITCOIN_P2P_PREFIX = 'f9beb4fe'.decode('hex')
37     BITCOIN_P2P_PORT = 8334
38     BITCOIN_ADDRESS_VERSION = 52
39     BITCOIN_RPC_PORT = 8332
40     BITCOIN_RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
41         'name_firstupdate' in (yield bitcoind.rpc_help()) and
42         'ixcoinaddress' not in (yield bitcoind.rpc_help()) and
43         not (yield bitcoind.rpc_getinfo())['testnet']
44     )))
45     BITCOIN_SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//210000)
46     BITCOIN_POW_FUNC = data.block_header_type.hash256
47     BITCOIN_SYMBOL = 'NMC'
48
49 class NamecoinTestnet(object):
50     BITCOIN_P2P_PREFIX = 'fabfb5fe'.decode('hex')
51     BITCOIN_P2P_PORT = 18334
52     BITCOIN_ADDRESS_VERSION = 111
53     BITCOIN_RPC_PORT = 8332
54     BITCOIN_RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
55         'name_firstupdate' in (yield bitcoind.rpc_help()) and
56         'ixcoinaddress' not in (yield bitcoind.rpc_help()) and
57         (yield bitcoind.rpc_getinfo())['testnet']
58     )))
59     BITCOIN_SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//210000)
60     BITCOIN_POW_FUNC = data.block_header_type.hash256
61     BITCOIN_SYMBOL = 'tNMC'
62
63
64 class LitecoinMainnet(object):
65     BITCOIN_P2P_PREFIX = 'fbc0b6db'.decode('hex')
66     BITCOIN_P2P_PORT = 9333
67     BITCOIN_ADDRESS_VERSION = 48
68     BITCOIN_RPC_PORT = 9332
69     BITCOIN_RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
70         'litecoinaddress' in (yield bitcoind.rpc_help()) and
71         not (yield bitcoind.rpc_getinfo())['testnet']
72     )))
73     BITCOIN_SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//840000)
74     BITCOIN_POW_FUNC = data.block_header_type.scrypt
75     BITCOIN_SYMBOL = 'LTC'
76
77 class LitecoinTestnet(object):
78     BITCOIN_P2P_PREFIX = 'fcc1b7dc'.decode('hex')
79     BITCOIN_P2P_PORT = 19333
80     BITCOIN_ADDRESS_VERSION = 111
81     BITCOIN_RPC_PORT = 19332
82     BITCOIN_RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
83         'litecoinaddress' in (yield bitcoind.rpc_help()) and
84         (yield bitcoind.rpc_getinfo())['testnet']
85     )))
86     BITCOIN_SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//840000)
87     BITCOIN_POW_FUNC = data.block_header_type.scrypt
88     BITCOIN_SYMBOL = 'tLTC'