@ -317,8 +317,7 @@ class AuxPowMixin(object):
return deserializer . read_header ( height , cls . BASIC_HEADER_SIZE )
class Bitcoin ( Coin ) :
NAME = " Bitcoin "
class BitcoinMixin ( object ) :
SHORTNAME = " BTC "
NET = " mainnet "
XPUB_VERBYTES = bytes . fromhex ( " 0488b21e " )
@ -332,6 +331,11 @@ class Bitcoin(Coin):
TX_COUNT_HEIGHT = 464000
TX_PER_BLOCK = 1800
RPC_PORT = 8332
class BitcoinCash ( BitcoinMixin , Coin ) :
NAME = " BitcoinCash "
SHORTNAME = " BCC "
PEERS = [
' electroncash.bitcoinplug.com s t ' ,
' electrum-abc.criptolayer.net s50012 ' ,
@ -344,10 +348,9 @@ class Bitcoin(Coin):
]
class BitcoinSegwit ( Bitcoin ) :
NET = " bitcoin-s egwit"
class BitcoinSegwit ( BitcoinMixin , Coin ) :
NAM E = " BitcoinS egwit"
DESERIALIZER = DeserializerSegWit
PEERS = [
' btc.smsys.me s995 ' ,
' electrum.be s t ' ,
@ -365,7 +368,8 @@ class BitcoinSegwit(Bitcoin):
' ELEX01.blackpole.online s t ' ,
]
class BitcoinTestnet ( Bitcoin ) :
class BitcoinTestnetMixin ( object ) :
SHORTNAME = " XTN "
NET = " testnet "
XPUB_VERBYTES = bytes . fromhex ( " 043587cf " )
@ -381,6 +385,11 @@ class BitcoinTestnet(Bitcoin):
TX_PER_BLOCK = 21
RPC_PORT = 18332
PEER_DEFAULT_PORTS = { ' t ' : ' 51001 ' , ' s ' : ' 51002 ' }
class BitcoinCashTestnet ( BitcoinTestnetMixin , Coin ) :
''' Bitcoin Testnet for Bitcoin Cash daemons. '''
NAME = " BitcoinCash "
PEERS = [
' electrum.akinbo.org s t ' ,
' he36kyperp3kbuxu.onion s t ' ,
@ -391,44 +400,34 @@ class BitcoinTestnet(Bitcoin):
]
class BitcoinRegtest ( BitcoinTestnet ) :
class BitcoinSegwitTestnet ( BitcoinTestnetMixin , Coin ) :
''' Bitcoin Testnet for Core bitcoind >= 0.13.1. '''
NAME = " BitcoinSegwit "
DESERIALIZER = DeserializerSegWit
class BitcoinSegwitRegtest ( BitcoinSegwitTestnet ) :
NAME = " BitcoinSegwit "
NET = " regtest "
GENESIS_HASH = ( ' 0f9188f13cb7b2c71f2a335e3a4fc328 '
' bf5beb436012afca590b1a11466e2206 ' )
PEERS = [ ]
TX_COUNT = 1
TX_COUNT_HEIGHT = 1
DESERIALIZER = DeserializerSegWit
class BitcoinTestnetSegWit ( BitcoinTestnet ) :
''' Bitcoin Testnet for Core bitcoind >= 0.13.1.
Unfortunately 0.13 .1 broke backwards compatibility of the RPC
interface ' s TX serialization, SegWit transactions serialize
differently than with earlier versions . If you are using such a
bitcoind on testnet , you must use this class as your " COIN " .
'''
NET = " testnet-segwit "
DESERIALIZER = DeserializerSegWit
class BitcoinNolnet ( Bitcoin ) :
class BitcoinNolnet ( BitcoinCash ) :
''' Bitcoin Unlimited nolimit testnet. '''
NET = " nolnet "
GENESIS_HASH = ( ' 0000000057e31bd2066c939a63b7b862 '
' 3bd0f10d8c001304bdfc1a7902ae6d35 ' )
PEERS = [ ]
REORG_LIMIT = 8000
TX_COUNT = 583589
TX_COUNT_HEIGHT = 8617
TX_PER_BLOCK = 50
IRC_PREFIX = " EN_ "
RPC_PORT = 28332
PEER_DEFAULT_PORTS = { ' t ' : ' 52001 ' , ' s ' : ' 52002 ' }
PEERS = [
' 14.3.140.101 s t ' ,
]
class Litecoin ( Coin ) :