diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -34,7 +34,7 @@ r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$") # Used to only select nodes with a user agent string compatible with the -# BCC/UAHF specification. +# BCH/UAHF specification. PATTERN_AGENT = re.compile( r"^(/BitcoinABC:0.16.(\d+)\(\S+\)/|/BitcoinXT:0.11.0G\(\S+\)/|/BUCash:1.1.(\d+)\(\S+\)/|/Classic:1.3.(\d+)\(\S+\)/)") @@ -43,7 +43,7 @@ sline = line.split() if len(sline) < 11: return None - # All BCC clients apart BU and Classic has a space in the useragent string + # All BCH clients apart BU and Classic has a space in the useragent string if len(sline) == 13: sline[11] = sline[11] + sline[12] if len(sline) == 14: @@ -178,9 +178,9 @@ # Filter out hosts with multiple bitcoin ports, these are likely abusive ips = filtermultiport(ips) # Look up ASNs and limit results, both per ASN and globally. - # TODO during this bootstrap phase we need any BCC full nodes + # TODO during this bootstrap phase we need any BCH full nodes # active on the network, uncomment the following line once the - # BCC chain will be consolidated. + # BCH chain will be consolidated. # ips = filterbyasn(ips, MAX_SEEDS_PER_ASN, NSEEDS) # Sort the results by IP address (for deterministic output). ips.sort(key=lambda x: (x['net'], x['sortkey'])) diff --git a/src/amount.h b/src/amount.h --- a/src/amount.h +++ b/src/amount.h @@ -111,7 +111,7 @@ * No amount larger than this (in satoshi) is valid. * * Note that this constant is *not* the total money supply, which in Bitcoin - * currently happens to be less than 21,000,000 BCC for various reasons, but + * currently happens to be less than 21,000,000 BCH for various reasons, but * rather a sanity check. As this sanity check is used by consensus-critical * validation code, the exact value of the MAX_MONEY constant is consensus * critical; in unusual circumstances like a(nother) overflow bug that allowed diff --git a/src/amount.cpp b/src/amount.cpp --- a/src/amount.cpp +++ b/src/amount.cpp @@ -7,7 +7,7 @@ #include "tinyformat.h" -const std::string CURRENCY_UNIT = "BCC"; +const std::string CURRENCY_UNIT = "BCH"; std::string Amount::ToString() const { return strprintf("%d.%08d %s", amount / COIN.GetSatoshis(), diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -380,7 +380,7 @@ } trackedTxs++; - // Feerates are stored and reported as BCC-per-kb: + // Feerates are stored and reported as BCH-per-kb: CFeeRate feeRate(entry.GetFee(), entry.GetTxSize()); mapMemPoolTxs[txid].blockHeight = txHeight; @@ -408,7 +408,7 @@ return false; } - // Feerates are stored and reported as BCC-per-kb: + // Feerates are stored and reported as BCH-per-kb: CFeeRate feeRate(entry->GetFee(), entry->GetTxSize()); feeStats.Record(blocksToConfirm, diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp --- a/src/qt/bitcoinamountfield.cpp +++ b/src/qt/bitcoinamountfield.cpp @@ -23,7 +23,7 @@ public: explicit AmountSpinBox(QWidget *parent) - : QAbstractSpinBox(parent), currentUnit(BitcoinUnits::BCC), + : QAbstractSpinBox(parent), currentUnit(BitcoinUnits::BCH), singleStep(100000 /* satoshis */) { setAlignment(Qt::AlignRight); @@ -89,7 +89,7 @@ const QFontMetrics fm(fontMetrics()); int h = lineEdit()->minimumSizeHint().height(); int w = fm.width(BitcoinUnits::format( - BitcoinUnits::BCC, BitcoinUnits::maxMoney(), false, + BitcoinUnits::BCH, BitcoinUnits::maxMoney(), false, BitcoinUnits::separatorAlways)); // Cursor blinking space. w += 2; diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h --- a/src/qt/bitcoinunits.h +++ b/src/qt/bitcoinunits.h @@ -56,7 +56,7 @@ * @note Source: https://en.bitcoin.it/wiki/Units. * Please add only sensible ones. */ - enum Unit { BCC, mBCC, uBCC }; + enum Unit { BCH, mBCH, uBCH }; enum SeparatorStyle { separatorNever, separatorStandard, separatorAlways }; diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/bitcoinunits.cpp @@ -13,17 +13,17 @@ QList BitcoinUnits::availableUnits() { QList unitlist; - unitlist.append(BCC); - unitlist.append(mBCC); - unitlist.append(uBCC); + unitlist.append(BCH); + unitlist.append(mBCH); + unitlist.append(uBCH); return unitlist; } bool BitcoinUnits::valid(int unit) { switch (unit) { - case BCC: - case mBCC: - case uBCC: + case BCH: + case mBCH: + case uBCH: return true; default: return false; @@ -32,12 +32,12 @@ QString BitcoinUnits::name(int unit) { switch (unit) { - case BCC: - return QString("BCC"); - case mBCC: - return QString("mBCC"); - case uBCC: - return QString::fromUtf8("μBCC"); + case BCH: + return QString("BCH"); + case mBCH: + return QString("mBCH"); + case uBCH: + return QString::fromUtf8("μBCH"); default: return QString("???"); } @@ -45,11 +45,11 @@ QString BitcoinUnits::description(int unit) { switch (unit) { - case BCC: + case BCH: return QString("Bitcoins"); - case mBCC: + case mBCH: return QString("Milli-Bitcoins (1 / 1" THIN_SP_UTF8 "000)"); - case uBCC: + case uBCH: return QString("Micro-Bitcoins (1 / 1" THIN_SP_UTF8 "000" THIN_SP_UTF8 "000)"); default: @@ -59,11 +59,11 @@ qint64 BitcoinUnits::factor(int unit) { switch (unit) { - case BCC: + case BCH: return 100000000; - case mBCC: + case mBCH: return 100000; - case uBCC: + case uBCH: return 100; default: return 100000000; @@ -72,11 +72,11 @@ int BitcoinUnits::decimals(int unit) { switch (unit) { - case BCC: + case BCH: return 8; - case mBCC: + case mBCH: return 5; - case uBCC: + case uBCH: return 2; default: return 0; diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -585,7 +585,7 @@ } // actually update labels - int nDisplayUnit = BitcoinUnits::BCC; + int nDisplayUnit = BitcoinUnits::BCH; if (model && model->getOptionsModel()) { nDisplayUnit = model->getOptionsModel()->getDisplayUnit(); } diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui --- a/src/qt/forms/coincontroldialog.ui +++ b/src/qt/forms/coincontroldialog.ui @@ -132,7 +132,7 @@ Qt::ActionsContextMenu - 0.00 BCC + 0.00 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -212,7 +212,7 @@ Qt::ActionsContextMenu - 0.00 BCC + 0.00 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -257,7 +257,7 @@ Qt::ActionsContextMenu - 0.00 BCC + 0.00 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -292,7 +292,7 @@ Qt::ActionsContextMenu - 0.00 BCC + 0.00 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -129,7 +129,7 @@ Unconfirmed transactions to watch-only addresses - 0.000 000 00 BCC + 0.000 000 00 BCH Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -154,7 +154,7 @@ Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance - 0.000 000 00 BCC + 0.000 000 00 BCH Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -179,7 +179,7 @@ Mined balance in watch-only addresses that has not yet matured - 0.000 000 00 BCC + 0.000 000 00 BCH Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -237,7 +237,7 @@ Mined balance that has not yet matured - 0.000 000 00 BCC + 0.000 000 00 BCH Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -282,7 +282,7 @@ Your current total balance - 0.000 000 00 BCC + 0.000 000 00 BCH Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -307,7 +307,7 @@ Current total balance in watch-only addresses - 0.000 000 00 BCC + 0.000 000 00 BCH Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -349,7 +349,7 @@ Your current spendable balance - 0.000 000 00 BCC + 0.000 000 00 BCH Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -374,7 +374,7 @@ Your current balance in watch-only addresses - 0.000 000 00 BCC + 0.000 000 00 BCH Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -324,7 +324,7 @@ Qt::ActionsContextMenu - 0.00 BCC + 0.00 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -404,7 +404,7 @@ Qt::ActionsContextMenu - 0.00 BCC + 0.00 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -455,7 +455,7 @@ Qt::ActionsContextMenu - 0.00 BCC + 0.00 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -484,7 +484,7 @@ Qt::ActionsContextMenu - 0.00 BCC + 0.00 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -1290,7 +1290,7 @@ IBeamCursor - 123.456 BCC + 123.456 BCH Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -193,7 +193,7 @@ fShouldReturnFalse = false; } else if (i->first == "amount") { if (!i->second.isEmpty()) { - if (!BitcoinUnits::parse(BitcoinUnits::BCC, i->second, + if (!BitcoinUnits::parse(BitcoinUnits::BCH, i->second, &rv.amount)) { return false; } @@ -231,7 +231,7 @@ if (info.amount) { ret += QString("?amount=%1") - .arg(BitcoinUnits::format(BitcoinUnits::BCC, info.amount, false, + .arg(BitcoinUnits::format(BitcoinUnits::BCH, info.amount, false, BitcoinUnits::separatorNever)); paramCount++; } diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -74,7 +74,7 @@ // Display if (!settings.contains("nDisplayUnit")) { - settings.setValue("nDisplayUnit", BitcoinUnits::BCC); + settings.setValue("nDisplayUnit", BitcoinUnits::BCH); } nDisplayUnit = settings.value("nDisplayUnit").toInt(); diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -26,7 +26,7 @@ public: TxViewDelegate(const PlatformStyle *_platformStyle, QObject *parent = nullptr) - : QAbstractItemDelegate(parent), unit(BitcoinUnits::BCC), + : QAbstractItemDelegate(parent), unit(BitcoinUnits::BCH), platformStyle(_platformStyle) {} inline void paint(QPainter *painter, const QStyleOptionViewItem &option, @@ -264,7 +264,7 @@ SLOT(updateWatchOnlyLabels(bool))); } - // update the display unit, to not use the default ("BCC") + // update the display unit, to not use the default ("BCH") updateDisplayUnit(); } diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -113,7 +113,7 @@ ui->memoTextLabel_s->clear(); ui->payAmount_s->clear(); - // update the display unit, to not use the default ("BCC") + // update the display unit, to not use the default ("BCH") updateDisplayUnit(); } diff --git a/src/qt/test/paymentrequestdata.h b/src/qt/test/paymentrequestdata.h --- a/src/qt/test/paymentrequestdata.h +++ b/src/qt/test/paymentrequestdata.h @@ -427,7 +427,7 @@ "; // -// Payment request with amount overflow (amount is set to 21000001 BCC) +// Payment request with amount overflow (amount is set to 21000001 BCH) // const char *paymentrequest5_cert2_BASE64 = "\ Egt4NTA5K3NoYTI1NhrQBArNBDCCAkkwggExoAMCAQICAQEwDQYJKoZIhvcNAQEL\ diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp --- a/src/qt/test/paymentservertests.cpp +++ b/src/qt/test/paymentservertests.cpp @@ -197,7 +197,7 @@ // compares 50001 <= BIP70_MAX_PAYMENTREQUEST_SIZE == false QCOMPARE(PaymentServer::verifySize(tempFile.size()), false); - // Payment request with amount overflow (amount is set to 21000001 BCC): + // Payment request with amount overflow (amount is set to 21000001 BCH): data = DecodeBase64(paymentrequest5_cert2_BASE64); byteArray = QByteArray((const char *)&data[0], data.size()); r.paymentRequest.parse(byteArray); diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -298,7 +298,7 @@ return obj; } -// NOTE: Unlike wallet RPC (which use BCC values), mining RPCs follow GBT (BIP +// NOTE: Unlike wallet RPC (which use BCH values), mining RPCs follow GBT (BIP // 22) in using satoshi amounts static UniValue prioritisetransaction(const Config &config, const JSONRPCRequest &request) { @@ -1002,7 +1002,7 @@ "\nResult:\n" "{\n" " \"feerate\" : x.x, (numeric) estimate fee-per-kilobyte (in " - "BCC)\n" + "BCH)\n" " \"blocks\" : n (numeric) block number where estimate " "was found\n" "}\n" diff --git a/src/test/compress_tests.cpp b/src/test/compress_tests.cpp --- a/src/test/compress_tests.cpp +++ b/src/test/compress_tests.cpp @@ -17,10 +17,10 @@ #define NUM_MULTIPLES_CENT 10000 // amounts 1 .. 10000 -#define NUM_MULTIPLES_1BCC 10000 +#define NUM_MULTIPLES_1BCH 10000 // amounts 50 .. 21000000 -#define NUM_MULTIPLES_50BCC 420000 +#define NUM_MULTIPLES_50BCH 420000 BOOST_FIXTURE_TEST_SUITE(compress_tests, BasicTestingSetup) @@ -55,11 +55,11 @@ BOOST_CHECK(TestEncode(i * CENT)); } - for (int64_t i = 1; i <= NUM_MULTIPLES_1BCC; i++) { + for (int64_t i = 1; i <= NUM_MULTIPLES_1BCH; i++) { BOOST_CHECK(TestEncode(i * COIN)); } - for (int64_t i = 1; i <= NUM_MULTIPLES_50BCC; i++) { + for (int64_t i = 1; i <= NUM_MULTIPLES_50BCH; i++) { BOOST_CHECK(TestEncode(i * 50 * COIN)); } diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -171,7 +171,7 @@ tx.vin[0].prevout.hash = txFirst[2]->GetId(); tx.vout.resize(2); tx.vout[0].nValue = 5000000000LL - 100000000; - // 1BCC output. + // 1BCH output. tx.vout[1].nValue = 100000000; uint256 hashFreeTx2 = tx.GetId(); mempool.addUnchecked(hashFreeTx2, diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -390,7 +390,7 @@ // Invalid, trailing garbage BOOST_CHECK_THROW(ParseNonRFCJSONValue("1.0sds"), std::runtime_error); BOOST_CHECK_THROW(ParseNonRFCJSONValue("1.0]"), std::runtime_error); - // BCC addresses should fail parsing + // BCH addresses should fail parsing BOOST_CHECK_THROW( ParseNonRFCJSONValue("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W"), std::runtime_error); diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -226,13 +226,13 @@ add_coin(4 * COIN); BOOST_CHECK(wallet.SelectCoinsMinConf(95 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); - // we should get 1 BCC in 1 coin + // we should get 1 BCH in 1 coin BOOST_CHECK_EQUAL(nValueRet, 1 * COIN); BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U); BOOST_CHECK(wallet.SelectCoinsMinConf(195 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); - // we should get 2 BCC in 1 coin + // we should get 2 BCH in 1 coin BOOST_CHECK_EQUAL(nValueRet, 2 * COIN); BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U);