diff --git a/test/functional/abc-magnetic-anomaly-mining.py b/test/functional/abc-magnetic-anomaly-mining.py --- a/test/functional/abc-magnetic-anomaly-mining.py +++ b/test/functional/abc-magnetic-anomaly-mining.py @@ -80,7 +80,7 @@ for _ in range(len(inputs)): addr = mining_node.getnewaddress() output = { - # 50 BCH per coinbase + # 50,000,000 XEC per coinbase addr: decimal.Decimal(50000000) } outputs.update(output) diff --git a/test/functional/feature_bip68_sequence.py b/test/functional/feature_bip68_sequence.py --- a/test/functional/feature_bip68_sequence.py +++ b/test/functional/feature_bip68_sequence.py @@ -95,7 +95,7 @@ def test_disable_flag(self): # Create some unconfirmed inputs new_addr = self.nodes[0].getnewaddress() - # send 2 BCH + # send 2,000,000 XEC self.nodes[0].sendtoaddress(new_addr, 2000000) utxos = self.nodes[0].listunspent(0, 0) diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py --- a/test/functional/rpc_fundrawtransaction.py +++ b/test/functional/rpc_fundrawtransaction.py @@ -517,7 +517,7 @@ ] )['address'] - # Send 1.2 BCH to msig addr. + # Send 1,200,000 XEC to msig addr. self.nodes[0].sendtoaddress(mSigObj, 1200000) self.nodes[0].generate(1) self.sync_all() diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -100,7 +100,8 @@ self.nodes[1].sendrawtransaction( self.nodes[1].finalizepsbt(walletprocesspsbt_out['psbt'])['hex']) - # feeRate of 0.1 BCH / KB produces a total fee slightly below -maxtxfee + # feeRate of 100,000 XEC / KB produces a total fee slightly below + # -maxtxfee res = self.nodes[1].walletcreatefundedpsbt( [ { @@ -110,7 +111,7 @@ "feeRate": 100000, "add_inputs": True}) assert_approx(res["fee"], 65000, 5000) - # feeRate of 10 BCH / KB produces a total fee well above -maxtxfee + # feeRate of 10,000,000 XEC / KB produces a total fee well above -maxtxfee # previously this was silently capped at -maxtxfee assert_raises_rpc_error(-4, "Fee exceeds maximum configured by -maxtxfee", diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py --- a/test/functional/rpc_rawtransaction.py +++ b/test/functional/rpc_rawtransaction.py @@ -357,7 +357,7 @@ # use balance deltas instead of absolute values bal = self.nodes[2].getbalance() - # send 1.2 BCH to msig adr + # send 1,200,000 XEC to msig adr txId = self.nodes[0].sendtoaddress(mSigObj, 1200000) self.sync_all() self.nodes[0].generate(1) @@ -603,12 +603,13 @@ self.sync_all() inputs = [{"txid": txId, "vout": vout['n']}] - # Fee 10,000 satoshis, (1 - (10000 sat * 0.00000001 BCH/sat)) = 0.9999 + # Fee 10,000 satoshis, (1,000,000 - (10000 sat * 0.01 XEC/sat)) = + # 999900 outputs = {self.nodes[0].getnewaddress(): Decimal("999900.00")} rawTx = self.nodes[2].createrawtransaction(inputs, outputs) rawTxSigned = self.nodes[2].signrawtransactionwithwallet(rawTx) assert_equal(rawTxSigned['complete'], True) - # Fee 10,000 satoshis, ~200 b transaction, fee rate should land around 50 sat/byte = 0.00050000 BCH/kB + # Fee 10,000 satoshis, ~200 b transaction, fee rate should land around 50 sat/byte = 500 XEC/kB # Thus, testmempoolaccept should reject testres = self.nodes[2].testmempoolaccept( [rawTxSigned['hex']], 500.00)[0] @@ -635,13 +636,13 @@ self.sync_all() inputs = [{"txid": txId, "vout": vout['n']}] - # Fee 2,000,000 satoshis, (1 - (2000000 sat * 0.00000001 BCH/sat)) = - # 0.98 + # Fee 2,000,000 satoshis, (1,000,000 - (2,000,000 sat * 0.01 XEC/sat)) = + # 980000 outputs = {self.nodes[0].getnewaddress(): Decimal("980000.00")} rawTx = self.nodes[2].createrawtransaction(inputs, outputs) rawTxSigned = self.nodes[2].signrawtransactionwithwallet(rawTx) assert_equal(rawTxSigned['complete'], True) - # Fee 2,000,000 satoshis, ~100 b transaction, fee rate should land around 20,000 sat/byte = 0.20000000 BCH/kB + # Fee 2,000,000 satoshis, ~100 b transaction, fee rate should land around 20,000 sat/byte = 200,000 XEC/kB # Thus, testmempoolaccept should reject testres = self.nodes[2].testmempoolaccept([rawTxSigned['hex']])[0] assert_equal(testres['allowed'], False) diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -47,7 +47,7 @@ MAX_BLOOM_FILTER_SIZE = 36000 MAX_BLOOM_HASH_FUNCS = 50 -# 1 BCH in satoshis +# 1,000,000 XEC in satoshis (legacy BCHA) COIN = 100000000 # 1 XEC in satoshis XEC = 100 diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -656,7 +656,7 @@ # 107 = length of PUSH(longest_sig = 72 bytes), PUSH(pubkey = 33 bytes) billable_size_estimate += len(tx.vin) * 107 - # relay_fee gives a value in BCH per kB. + # relay_fee gives a value in XEC per kB. return int(self.relay_fee() / 1000 * billable_size_estimate * XEC) def calculate_fee_from_txid(self, txid): diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -48,10 +48,10 @@ target_fee = round(tx_size * fee_per_kB / 1000, 8) if fee < (tx_size - wiggleroom) * fee_per_kB / 1000: raise AssertionError( - "Fee of {} BCH too low! (Should be {} BCH)".format(str(fee), str(target_fee))) + "Fee of {} XEC too low! (Should be {} XEC)".format(str(fee), str(target_fee))) if fee > (tx_size + wiggleroom) * fee_per_kB / 1000: raise AssertionError( - "Fee of {} BCH too high! (Should be {} BCH)".format(str(fee), str(target_fee))) + "Fee of {} XEC too high! (Should be {} XEC)".format(str(fee), str(target_fee))) def assert_equal(thing1, thing2, *args): @@ -218,7 +218,8 @@ def check_json_precision(): - """Make sure json library being used does not lose precision converting BCH values""" + """Make sure json library being used does not lose precision converting XEC + values""" n = Decimal("20000000.00000003") satoshis = int(json.loads(json.dumps(float(n))) * 1.0e8) if satoshis != 2000000000000003: diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py --- a/test/functional/wallet_abandonconflict.py +++ b/test/functional/wallet_abandonconflict.py @@ -89,15 +89,15 @@ self.nodes[0].createrawtransaction(inputs, outputs)) txAB1 = self.nodes[0].sendrawtransaction(signed["hex"]) - # Identify the 14.99998btc output + # Identify the 14,999,980 XEC output nAB = next(tx_out["vout"] for tx_out in self.nodes[0].gettransaction( txAB1)["details"] if tx_out["amount"] == Decimal("14999980")) # Create a child tx spending AB1 and C inputs = [] - # Amount 14.99998 BCH + # Amount 14,999,980 XEC inputs.append({"txid": txAB1, "vout": nAB}) - # Amount 10 BCH + # Amount 10,000,000 XEC inputs.append({"txid": txC, "vout": nC}) outputs = {} outputs[self.nodes[0].getnewaddress()] = Decimal("24999600") @@ -210,18 +210,19 @@ connect_nodes(self.nodes[0], self.nodes[1]) self.sync_blocks() - # Verify that B and C's 10 BCH outputs are available for spending again - # because AB1 is now conflicted + # Verify that B and C's 10,000,000 XEC outputs are available for + # spending again because AB1 is now conflicted newbalance = self.nodes[0].getbalance() assert_equal(newbalance, balance + Decimal("20000000")) balance = newbalance - # There is currently a minor bug around this and so this test doesn't work. See Issue #7315 - # Invalidate the block with the double spend and B's 10 BCH output should no longer be available - # Don't think C's should either + # There is currently a minor bug around this and so this test doesn't + # work. See Issue #7315 + # Invalidate the block with the double spend and B's 10,000,000 XEC + # output should no longer be available. Don't think C's should either self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) newbalance = self.nodes[0].getbalance() - # assert_equal(newbalance, balance - Decimal("10")) + # assert_equal(newbalance, balance - Decimal("10000000")) self.log.info( "If balance has not declined after invalidateblock then out of mempool wallet tx which is no longer") self.log.info( diff --git a/test/functional/wallet_balance.py b/test/functional/wallet_balance.py --- a/test/functional/wallet_balance.py +++ b/test/functional/wallet_balance.py @@ -214,7 +214,7 @@ test_balances(fee_node_1=Decimal('10000')) # In the original Core version of this test, Node 1 would've bumped - # the fee by 0.01 here to resend, but this is BCH, so it has 0.01 BCH + # the fee by 0.01 here to resend, but this is XEC, so it has 10000 XEC # left to spend on goods and services self.sync_all() diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -86,7 +86,7 @@ txid=confirmed_txid, n=confirmed_index, include_mempool=True) assert_equal(txout['value'], 50000000) - # Send 21 BCH from 0 to 2 using sendtoaddress call. + # Send 21,000,000 XEC from 0 to 2 using sendtoaddress call. self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11000000) mempool_txid = self.nodes[0].sendtoaddress( self.nodes[2].getnewaddress(), 10000000) @@ -196,7 +196,7 @@ assert_raises_rpc_error(-8, "Invalid parameter, expected unspent output", self.nodes[0].lockunspent, False, [spent_0]) - # Send 10 BCH normal + # Send 10,000,000 XEC normal old_balance = self.nodes[2].getbalance() address = self.nodes[0].getnewaddress("test") fee_per_byte = Decimal('1000') / 1000 @@ -211,7 +211,7 @@ fee_per_byte, ctx.billable_size()) assert_equal(self.nodes[0].getbalance(), Decimal('10000000')) - # Send 10 BCH with subtract fee from amount + # Send 10,000,000 XEC with subtract fee from amount txid = self.nodes[2].sendtoaddress(address, 10000000, "", "", True) self.nodes[2].generate(1) self.sync_all(self.nodes[0:3]) @@ -220,7 +220,7 @@ node_0_bal = self.check_fee_amount(self.nodes[0].getbalance(), Decimal( '20000000'), fee_per_byte, count_bytes(self.nodes[2].gettransaction(txid)['hex'])) - # Sendmany 10 BCH + # Sendmany 10,000,000 XEC txid = self.nodes[2].sendmany('', {address: 10000000}, 0, "", []) self.nodes[2].generate(1) self.sync_all(self.nodes[0:3]) @@ -231,7 +231,7 @@ ), node_2_bal - Decimal('10000000'), fee_per_byte, ctx.billable_size()) assert_equal(self.nodes[0].getbalance(), node_0_bal) - # Sendmany 10 BCH with subtract fee from amount + # Sendmany 10,000,000 XEC with subtract fee from amount txid = self.nodes[2].sendmany( '', {address: 10000000}, 0, "", [address]) self.nodes[2].generate(1) diff --git a/test/functional/wallet_import_rescan.py b/test/functional/wallet_import_rescan.py --- a/test/functional/wallet_import_rescan.py +++ b/test/functional/wallet_import_rescan.py @@ -8,12 +8,12 @@ importmulti RPCs with different types of keys and rescan options. In the first part of the test, node 0 creates an address for each type of -import RPC call and node 0 sends BCH to it. Then other nodes import the +import RPC call and node 0 sends XEC to it. Then other nodes import the addresses, and the test makes listtransactions and getbalance calls to confirm that the importing node either did or did not execute rescans picking up the send transactions. -In the second part of the test, node 0 sends more BCH to each address, and the +In the second part of the test, node 0 sends more XEC to each address, and the test makes more listtransactions and getbalance calls to confirm that the importing nodes pick up the new transactions regardless of whether rescans happened previously. diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py --- a/test/functional/wallet_listsinceblock.py +++ b/test/functional/wallet_listsinceblock.py @@ -150,8 +150,8 @@ Problematic case: - 1. User 1 receives BCH in tx1 from utxo1 in block aa1. - 2. User 2 receives BCH in tx2 from utxo1 (same) in block bb1 + 1. User 1 receives XEC in tx1 from utxo1 in block aa1. + 2. User 2 receives XEC in tx2 from utxo1 (same) in block bb1 3. User 1 sees 2 confirmations at block aa3. 4. Reorg into bb chain. 5. User 1 asks `listsinceblock aa3` and does not see that tx1 is now diff --git a/test/functional/wallet_txn_clone.py b/test/functional/wallet_txn_clone.py --- a/test/functional/wallet_txn_clone.py +++ b/test/functional/wallet_txn_clone.py @@ -35,7 +35,7 @@ def run_test(self): output_type = "legacy" - # All nodes should start with 1,250 BCH: + # All nodes should start with 1,250,000,000 XEC: starting_balance = 1250000000 for i in range(4): assert_equal(self.nodes[i].getbalance(), starting_balance) @@ -138,8 +138,8 @@ assert_equal(tx1_clone["confirmations"], 2) assert_equal(tx2["confirmations"], 1) - # Check node0's total balance; should be same as before the clone, + 100 BCH for 2 matured, - # less possible orphaned matured subsidy + # Check node0's total balance; should be same as before the clone, + + # 100,000,000 XEC for 2 matured, less possible orphaned matured subsidy expected += 100000000 if (self.options.mine_block): expected -= 50000000 diff --git a/test/functional/wallet_txn_doublespend.py b/test/functional/wallet_txn_doublespend.py --- a/test/functional/wallet_txn_doublespend.py +++ b/test/functional/wallet_txn_doublespend.py @@ -33,7 +33,7 @@ disconnect_nodes(self.nodes[1], self.nodes[2]) def run_test(self): - # All nodes should start with 1,250 BCH: + # All nodes should start with 1,250,000,000 XEC: starting_balance = 1250000000 # All nodes should be out of IBD. @@ -65,8 +65,8 @@ # Coins are sent to node1_address node1_address = self.nodes[1].getnewaddress() - # First: use raw transaction API to send 1240 BCH to node1_address, - # but don't broadcast: + # First: use raw transaction API to send 1,240,000,000 XEC to + # node1_address, but don't broadcast: doublespend_fee = Decimal('-20000') rawtx_input_0 = {} rawtx_input_0["txid"] = fund_foo_txid @@ -85,7 +85,7 @@ doublespend = self.nodes[0].signrawtransactionwithwallet(rawtx) assert_equal(doublespend["complete"], True) - # Create two spends using 1 50 BCH coin each + # Create two spends using 1 50,000,000 XEC coin each txid1 = self.nodes[0].sendtoaddress(node1_address, 40000000) txid2 = self.nodes[0].sendtoaddress(node1_address, 20000000) @@ -97,8 +97,9 @@ tx1 = self.nodes[0].gettransaction(txid1) tx2 = self.nodes[0].gettransaction(txid2) - # Node0's balance should be starting balance, plus 50BTC for another - # matured block, minus 40, minus 20, and minus transaction fees: + # Node0's balance should be starting balance, plus 50,000,000 XEC for + # another matured block, minus 40,000,000, minus 20,000,000, and minus + # transaction fees: expected = starting_balance + fund_foo_tx["fee"] + fund_bar_tx["fee"] if self.options.mine_block: expected += 50000000