1 from twisted.internet import defer
6 class BitcoinMainnet(object):
7 P2P_PREFIX = 'f9beb4d9'.decode('hex')
11 RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
12 'bitcoinaddress' in (yield bitcoind.rpc_help()) and
13 not (yield bitcoind.rpc_getinfo())['testnet']
15 SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//210000)
16 POW_FUNC = data.block_header_type.hash256
19 class BitcoinTestnet(object):
20 P2P_PREFIX = 'fabfb5da'.decode('hex')
24 RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
25 'bitcoinaddress' in (yield bitcoind.rpc_help()) and
26 (yield bitcoind.rpc_getinfo())['testnet']
28 SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//210000)
29 POW_FUNC = data.block_header_type.hash256
33 class NamecoinMainnet(object):
34 P2P_PREFIX = 'f9beb4fe'.decode('hex')
38 RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
39 'namecoinaddress' in (yield bitcoind.rpc_help()) and
40 not (yield bitcoind.rpc_getinfo())['testnet']
42 SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//210000)
43 POW_FUNC = data.block_header_type.hash256
46 class NamecoinTestnet(object):
47 P2P_PREFIX = 'fabfb5fe'.decode('hex')
51 RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
52 'namecoinaddress' in (yield bitcoind.rpc_help()) and
53 (yield bitcoind.rpc_getinfo())['testnet']
55 SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//210000)
56 POW_FUNC = data.block_header_type.hash256
60 class LitecoinMainnet(object):
61 P2P_PREFIX = 'fbc0b6db'.decode('hex')
65 RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
66 'litecoinaddress' in (yield bitcoind.rpc_help()) and
67 not (yield bitcoind.rpc_getinfo())['testnet']
69 SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//840000)
70 POW_FUNC = data.block_header_type.scrypt
73 class LitecoinTestnet(object):
74 P2P_PREFIX = 'fcc1b7dc'.decode('hex')
78 RPC_CHECK = staticmethod(defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
79 'litecoinaddress' in (yield bitcoind.rpc_help()) and
80 (yield bitcoind.rpc_getinfo())['testnet']
82 SUBSIDY_FUNC = staticmethod(lambda height: 50*100000000 >> (height + 1)//840000)
83 POW_FUNC = data.block_header_type.scrypt