Browse Source

Support Bitcoin Cash Node (BCH,BCHN), update documentation

Support the majority chain after the Nov. 15 BCH -> BCHA,BCHN split
The MMGen Project 4 years ago
parent
commit
b183682e57
4 changed files with 14 additions and 14 deletions
  1. 2 2
      mmgen/altcoin.py
  2. 2 2
      mmgen/daemon.py
  3. 1 1
      mmgen/tw.py
  4. 9 9
      test/test-release.sh

+ 2 - 2
mmgen/altcoin.py

@@ -62,7 +62,7 @@ class CoinInfo(object):
 #   Non core-coin fork coins (i.e. BCG) must be disabled here to prevent generation from
 #   incorrect scrambled seed.
 	ce('Bitcoin',               'BTC',     0x80,   (0x00,'1'),       (0x05,'3'),       True,  5),
-	ce('Bcash',                 'BCH',     0x80,   (0x00,'1'),       (0x05,'3'),       False, 5),
+	ce('BitcoinCashNode',       'BCH',     0x80,   (0x00,'1'),       (0x05,'3'),       False, 5),
 	ce('BitcoinGold',           'BCG',     0x80,   (0x00,'1'),       (0x05,'3'),       True, -1),
 	ce('2GiveCoin',             '2GIVE',   0xa7,   (0x27,('G','H')), None,             False, 0),
 	ce('42Coin',                '42',      0x88,   (0x08,'4'),       None,             False, 1),
@@ -214,7 +214,7 @@ class CoinInfo(object):
 
 	coin_constants['testnet'] = (
 	ce('Bitcoin',     'BTC',   0xef,   (0x6f,('m','n')), (0xc4,'2'),       True,  5),
-	ce('Bcash',       'BCH',   0xef,   (0x6f,('m','n')), (0xc4,'2'),       True,  5),
+	ce('BitcoinCashNode','BCH',0xef,   (0x6f,('m','n')), (0xc4,'2'),       True,  5),
 	ce('BitcoinGold', 'BCG',   0xef,   (0x6f,('m','n')), (0xc4,'2'),       True, -1),
 	ce('Dash',        'DASH',  0xef,   (0x8c,'y'),       (0x13,('8','9')), False, 1),
 	ce('Decred',      'DCR',   0x230e, (0x0f21,'T'),     (0x0e6c,'S'),     False, 1),

+ 2 - 2
mmgen/daemon.py

@@ -298,7 +298,7 @@ class CoinDaemon(Daemon):
 
 	daemon_ids = { # for BCH we use non-standard RPC ports
 'btc': cd('Bitcoin',         'Bitcoin', 'bitcoind',    'bitcoin-cli', 'bitcoin.conf', 'testnet3',8332,18332,18444),
-'bch': cd('Bcash',           'Bitcoin', 'bitcoind-abc','bitcoin-cli', 'bitcoin.conf', 'testnet3',8442,18442,18553),
+'bch': cd('BitcoinCashNode', 'Bitcoin', 'bitcoind-bchn','bitcoin-cli-bchn','bitcoin.conf','testnet3',8442,18442,18553),
 'ltc': cd('Litecoin',        'Bitcoin', 'litecoind',   'litecoin-cli','litecoin.conf','testnet4',9332,19332,19444),
 'xmr': cd('Monero',          'Monero',  'monerod',     'monerod',     'bitmonero.conf',None,     18081,None,None),
 'eth': cd('Ethereum',        'Ethereum','openethereum','openethereum','parity.conf',   None,     8545, 8545,8545),
@@ -401,7 +401,7 @@ class CoinDaemon(Daemon):
 		if g.platform == 'linux':
 			path_data = {
 				'btc': ['.bitcoin'],
-				'bch': ['.bitcoin-abc'],
+				'bch': ['.bitcoin-bchn'],
 				'ltc': ['.litecoin'],
 				'xmr': ['.bitmonero'],
 				'eth': ['.local','share','io.parity.ethereum'],

+ 1 - 1
mmgen/tw.py

@@ -904,7 +904,7 @@ class TrackingWallet(MMGenObject,metaclass=aInitMeta):
 
 	@write_mode
 	async def set_label(self,coinaddr,lbl):
-		# bitcoin-abc 'setlabel' RPC is broken, so use old 'importaddress' method to set label
+		# bitcoin-{abc,bchn} 'setlabel' RPC is broken, so use old 'importaddress' method to set label
 		# broken behavior: new label is set OK, but old label gets attached to another address
 		if 'label_api' in self.rpc.caps and self.proto.coin != 'BCH':
 			args = ('setlabel',coinaddr,lbl)

+ 9 - 9
test/test-release.sh

@@ -263,7 +263,7 @@ t_color="$colortest_py"
 f_color='Terminal color tests completed'
 
 i_unit='Unit'
-s_unit='The bitcoin and bitcoin-abc mainnet daemons must be running for the following tests'
+s_unit='The bitcoin and bitcoin-bchn mainnet daemons must be running for the following tests'
 t_unit="$unit_tests_py"
 f_unit='Unit tests completed'
 
@@ -386,7 +386,7 @@ t_etc="
 f_etc='Ethereum Classic tests completed'
 
 i_autosign='Autosign'
-s_autosign='The bitcoin, bitcoin-abc and litecoin mainnet and testnet daemons must be running for the following test'
+s_autosign='The bitcoin, bitcoin-bchn and litecoin mainnet and testnet daemons must be running for the following test'
 t_autosign="$test_py autosign"
 f_autosign='Autosign test completed'
 
@@ -428,17 +428,17 @@ s_btc_rt="The following tests will test MMGen's regtest (Bob and Alice) mode"
 t_btc_rt="$test_py regtest"
 f_btc_rt='Regtest (Bob and Alice) mode tests for BTC completed'
 
-i_bch='Bcash (BCH) mainnet'
-s_bch='The bitcoin-abc mainnet daemon must both be running for the following tests'
+i_bch='BitcoinCashNode (BCH) mainnet'
+s_bch='The bitcoin-bchn mainnet daemon must both be running for the following tests'
 t_bch="$test_py --coin=bch --exclude regtest"
-f_bch='Bcash (BCH) mainnet tests completed'
+f_bch='BitcoinCashNode (BCH) mainnet tests completed'
 
-i_bch_tn='Bcash (BCH) testnet'
-s_bch_tn='The bitcoin-abc testnet daemon must both be running for the following tests'
+i_bch_tn='BitcoinCashNode (BCH) testnet'
+s_bch_tn='The bitcoin-bchn testnet daemon must both be running for the following tests'
 t_bch_tn="$test_py --coin=bch --testnet=1 --exclude regtest"
-f_bch_tn='Bcash (BCH) testnet tests completed'
+f_bch_tn='BitcoinCashNode (BCH) testnet tests completed'
 
-i_bch_rt='Bcash (BCH) regtest'
+i_bch_rt='BitcoinCashNode (BCH) regtest'
 s_bch_rt="The following tests will test MMGen's regtest (Bob and Alice) mode"
 t_bch_rt="$test_py --coin=bch regtest"
 f_bch_rt='Regtest (Bob and Alice) mode tests for BCH completed'