[Dev] Documenting Feathercoin Specific Software settings - Part 1
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/b73a405176a5c15d297eda85fb3c2a5723dca0ae
qt/res/feathercoin-qt-res.rc
qt/res/feathercoin-qt-res.rc contains a number of Feathercoin settings changes. Feathercoin specific file name change.
+ IDI_ICON1 ICON DISCARDABLE "icons/bitcoin.ico" + IDI_ICON2 ICON DISCARDABLE "icons/bitcoin_testnet.ico" + + #include <windows.h> // needed for VERSIONINFO + #include "../../clientversion.h" // holds the needed client version information + + #define VER_PRODUCTVERSION CLIENT_VERSION_MAJOR,CLIENT_VERSION_MINOR,CLIENT_VERSION_REVISION,CLIENT_VERSION_BUILD + #define VER_PRODUCTVERSION_STR STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD) + #define VER_FILEVERSION VER_PRODUCTVERSION + #define VER_FILEVERSION_STR VER_PRODUCTVERSION_STR + #define COPYRIGHT_STR "Feathercoin developers 2013-" STRINGIZE(COPYRIGHT_YEAR) ", The Bitcoin developers 2009-" STRINGIZE(COPYRIGHT_YEAR) + + VS_VERSION_INFO VERSIONINFO + FILEVERSION VER_FILEVERSION + PRODUCTVERSION VER_PRODUCTVERSION + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" // U.S. English - multilingual (hex) + BEGIN + VALUE "CompanyName", "Feathercoin" + VALUE "FileDescription", "Feathercoin Core (OSS GUI client for Feathercoin)" + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "InternalName", "feathercoin-qt" + VALUE "LegalCopyright", COPYRIGHT_STR + VALUE "LegalTrademarks1", "Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php." + VALUE "OriginalFilename", "feathercoin-qt.exe" + VALUE "ProductName", "Feathercoin Core" + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal) + END + END
Review, could be specified as an alternate file at build time?
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/49cb289ae746ce7269d809f6e45988f785e6e6ac
src/qt/res/images/
qt/res/images/ contains a number of Feathercoin image file changes. Feathercoin specific file name change. Alternate solution FTC images directory / build option??
Check where each of these is being used?
src/qt/res/images/LOGO.png src/qt/res/images/mainbg.png src/qt/res/images/splash.png src/qt/res/images/splash_256.png
https://github.com/FeatherCoin/Feathercoin/commit/89e49238366fd9597ca3f8e5b2711f48e402372b
Commit 2
src/qt/res/images/about.png src/qt/res/images/about_bitcoin.png src/qt/res/images/splash.png src/qt/res/images/splash_bitcoin.png
https://github.com/FeatherCoin/Feathercoin/commit/516a78744d2eac208b61a864f81d59dc9055568d
src/qt/res/images/
3rd commit
src/qt/res/images/bitcoinbazaar.co.uk.png src/qt/res/images/btc-e.png src/qt/res/images/bter.png src/qt/res/images/cm.png src/qt/res/images/cryptsy.png src/qt/res/images/ct.png src/qt/res/images/feathercoinmap.png src/qt/res/images/mc.png src/qt/res/images/pockio.png src/qt/res/images/splash01.png
Note there are further commits.
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/4260da19879b05cd7823d0059e219a2f4c24ec80
src/qt/res/icons/
qt/res/icons/ contains a number of Feathercoin image file changes. Feathercoin specific file name change. Alternate solution FTC images directory / build option??
src/qt/res/icons/account-report.png src/qt/res/icons/bitcoin.ico src/qt/res/icons/bitcoin.png src/qt/res/icons/bitcoin_testnet.ico src/qt/res/icons/bitcoin_testnet.png
https://github.com/FeatherCoin/Feathercoin/commit/516a78744d2eac208b61a864f81d59dc9055568d
src/qt/res/icons/
2nd commit
src/qt/res/icons/merchantList.png src/qt/res/icons/toolbar.png src/qt/res/icons/toolbar_testnet.png
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
This file has been updated significantly in later commits. Review handling Readme and Docs directory customizations.
https://github.com/FeatherCoin/Feathercoin/commit/4260da19879b05cd7823d0059e219a2f4c24ec80
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
alert.h
Copyright
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/16820b0452399de8d66edf64dd9821aebb955a90
chainparams.h
No real changes, white space removed.
chainparams.h
Second commit to chainparams.h
https://github.com/FeatherCoin/Feathercoin/commit/38ea92e59f3ba01debbb3fd3eebb617ded985852
- //LogPrintf("Debug 1:hashGenesisBlock=%s",hashGenesisBlock.ToString().c_str()); - //LogPrintf("Debug 1:genesis.hashMerkleRoot=%s",genesis.hashMerkleRoot.ToString().c_str());
Debug interface removed .
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/bitcoingui.cpp
+ QString windowTitle = tr("Feathercoin Core") + " - ";
Name change
+ optionsAction->setStatusTip(tr("Modify configuration options for Feathercoin"));
Message name change
- openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this); - openAction->setStatusTip(tr("Open a bitcoin: URI or payment request"));
openAction interface change
+ openAction = new QAction(QIcon(":/icons/openurl"), tr("Open &URI..."), this); + openAction->setStatusTip(tr("Open a feathercoin: URI or payment request")); + showHelpMessageAction->setStatusTip(tr("Show the Feathercoin Core help message to get a list with possible Feathercoin command-line options")); + setNumBlocks(clientModel->getNumBlocks()); + connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int))); + trayIcon->setToolTip(tr("Feathercoin client")); + trayIcon->setToolTip(tr("Feathercoin client") + " " + tr("[testnet]")); + void BitcoinGUI::setNumBlocks(int count)
Bitcoin code replaced.
if(count < nTotalBlocks) + tooltip = tr("Processed %1 blocks of transaction history.").arg(count); - { - tooltip = tr("Processed %1 of %2 (estimated) blocks of transaction history.").arg(count).arg(nTotalBlocks); - } - else - { - tooltip = tr("Processed %1 blocks of transaction history.").arg(count);
Tooltip interface change?
// Set icon state: spinning if catching up, tick otherwise - if(secs < 90*60 && count >= nTotalBlocks) + if(secs < 90*60)
If conditions changed.
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
src/qt/bitcoingui.cpp
Second commit
+ sendCoinsAction->setStatusTip(tr("Send coins to a Feathercoin address")); + receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and feathercoin: URIs)"));
Tip status interface change
src/qt/bitcoingui.cpp
Third commit
+ + QPalette palette; + palette.setBrush(QPalette::Background,QBrush(QPixmap(":/images/mainbg"))); + this->setPalette(palette); + this->setAutoFillBackground(true);
Palette code addition
+ + accountReportAction = new QAction(QIcon(":/icons/account-report"), tr("&Report"), this); + accountReportAction->setStatusTip(tr("Get my account report")); + accountReportAction->setToolTip(accountReportAction->statusTip()); + accountReportAction->setCheckable(true); + accountReportAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); + tabGroup->addAction(accountReportAction);
Tooltips interface change
+ connect(accountReportAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + connect(accountReportAction, SIGNAL(triggered()), this, SLOT(gotoAccountReportPage()));
Code addition
+ aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About Feathercoin Core"), this); + aboutAction = new QAction(QIcon(":/icons/bitcoin_testnet"), tr("&About Feathercoin Core"), this); + aboutAction->setStatusTip(tr("Show information about Feathercoin")); + signMessageAction->setStatusTip(tr("Sign messages with your Feathercoin addresses to prove you own them")); + verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Feathercoin addresses"));
Interface name change. Bitcoin code replaced
+ toolbar->addAction(accountReportAction); + accountReportAction->setEnabled(enabled);
Code added
+void BitcoinGUI::gotoAccountReportPage() +{ + accountReportAction->setChecked(true); + if (walletFrame) walletFrame->gotoAccountReportPage(); +} +
Code added scrypt interface
+ labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Feathercoin network", "", count)); + QString strTitle = tr("Feathercoin"); // default title
Bitcoin Code replaced scrypt interface
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/bitcoinunits.cpp
+ unitlist.append(FTC); + unitlist.append(mFTC); + unitlist.append(uFTC); + case FTC: + case mFTC: + case uFTC: + case FTC: return QString("FTC"); + case mFTC: return QString("mFTC"); + case uFTC: return QString::fromUtf8("μFTC");
Bitcoin code replaced. Not in translations or Public variable?
+ case FTC: return QString("Feathercoins"); + case mFTC: return QString("Milli-Feathercoins (1 / 1,000)"); + case uFTC: return QString("Micro-Feathercoins (1 / 1,000,000)"); + case FTC: return 100000000; + case mFTC: return 100000; + case uFTC: return 100; + case FTC: return Q_INT64_C(336000000); + case mFTC: return Q_INT64_C(336000000000); + case uFTC: return Q_INT64_C(336000000000000); + case FTC: return 9; // 336,000,000 (# digits, without commas) + case mFTC: return 12; // 336,000,000,000 + case uFTC: return 15; // 336,000,000,000,000 + case FTC: return 8; + case mFTC: return 5; + case uFTC: return 2;
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/bitcoinunits.h
+ FTC, + mFTC, + uFTC
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/coincontroldialog.cpp
+ int nDisplayUnit = BitcoinUnits::FTC;
Name change coins FTC
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/feathercoin.qrc
maintain feathercoin version of file? from LTC?
+ <!DOCTYPE RCC><RCC version="1.0"> + <qresource prefix="/icons"> + <file alias="bitcoin">res/icons/bitcoin.png</file> + <file alias="openurl">res/icons/openurl.png</file> + <file alias="address-book">res/icons/address-book.png</file> + <file alias="quit">res/icons/quit.png</file> + <file alias="send">res/icons/send.png</file> + <file alias="toolbar">res/icons/toolbar.png</file> + <file alias="connect_0">res/icons/connect0_16.png</file> + <file alias="connect_1">res/icons/connect1_16.png</file> + <file alias="connect_2">res/icons/connect2_16.png</file> + <file alias="connect_3">res/icons/connect3_16.png</file> + <file alias="connect_4">res/icons/connect4_16.png</file> + <file alias="transaction_0">res/icons/transaction0.png</file> + <file alias="transaction_confirmed">res/icons/transaction2.png</file> + <file alias="transaction_conflicted">res/icons/transaction_conflicted.png</file> + <file alias="transaction_1">res/icons/clock1.png</file> + <file alias="transaction_2">res/icons/clock2.png</file> + <file alias="transaction_3">res/icons/clock3.png</file> + <file alias="transaction_4">res/icons/clock4.png</file> + <file alias="transaction_5">res/icons/clock5.png</file> + <file alias="options">res/icons/configure.png</file> + <file alias="receiving_addresses">res/icons/receive.png</file> + <file alias="editpaste">res/icons/editpaste.png</file> + <file alias="editcopy">res/icons/editcopy.png</file> + <file alias="add">res/icons/add.png</file> + <file alias="bitcoin_testnet">res/icons/bitcoin_testnet.png</file> + <file alias="toolbar_testnet">res/icons/toolbar_testnet.png</file> + <file alias="edit">res/icons/edit.png</file> + <file alias="history">res/icons/history.png</file> + <file alias="overview">res/icons/overview.png</file> + <file alias="export">res/icons/export.png</file> + <file alias="synced">res/icons/synced.png</file> + <file alias="remove">res/icons/remove.png</file> + <file alias="tx_mined">res/icons/tx_mined.png</file> + <file alias="tx_input">res/icons/tx_input.png</file> + <file alias="tx_output">res/icons/tx_output.png</file> + <file alias="tx_inout">res/icons/tx_inout.png</file> + <file alias="lock_closed">res/icons/lock_closed.png</file> + <file alias="lock_open">res/icons/lock_open.png</file> + <file alias="key">res/icons/key.png</file> + <file alias="filesave">res/icons/filesave.png</file> + <file alias="qrcode">res/icons/qrcode.png</file> + <file alias="debugwindow">res/icons/debugwindow.png</file> + </qresource> + <qresource prefix="/images"> + <file alias="about">res/images/about.png</file> + <file alias="splash">res/images/splash.png</file> + <file alias="splash_testnet">res/images/splash_testnet.png</file> + </qresource> + <qresource prefix="/movies"> + <file alias="spinner-000">res/movies/spinner-000.png</file> + <file alias="spinner-001">res/movies/spinner-001.png</file> + <file alias="spinner-002">res/movies/spinner-002.png</file> + <file alias="spinner-003">res/movies/spinner-003.png</file> + <file alias="spinner-004">res/movies/spinner-004.png</file> + <file alias="spinner-005">res/movies/spinner-005.png</file> + <file alias="spinner-006">res/movies/spinner-006.png</file> + <file alias="spinner-007">res/movies/spinner-007.png</file> + <file alias="spinner-008">res/movies/spinner-008.png</file> + <file alias="spinner-009">res/movies/spinner-009.png</file> + <file alias="spinner-010">res/movies/spinner-010.png</file> + <file alias="spinner-011">res/movies/spinner-011.png</file> + <file alias="spinner-012">res/movies/spinner-012.png</file> + <file alias="spinner-013">res/movies/spinner-013.png</file> + <file alias="spinner-014">res/movies/spinner-014.png</file> + <file alias="spinner-015">res/movies/spinner-015.png</file> + <file alias="spinner-016">res/movies/spinner-016.png</file> + <file alias="spinner-017">res/movies/spinner-017.png</file> + <file alias="spinner-018">res/movies/spinner-018.png</file> + <file alias="spinner-019">res/movies/spinner-019.png</file> + <file alias="spinner-020">res/movies/spinner-020.png</file> + <file alias="spinner-021">res/movies/spinner-021.png</file> + <file alias="spinner-022">res/movies/spinner-022.png</file> + <file alias="spinner-023">res/movies/spinner-023.png</file> + <file alias="spinner-024">res/movies/spinner-024.png</file> + <file alias="spinner-025">res/movies/spinner-025.png</file> + <file alias="spinner-026">res/movies/spinner-026.png</file> + <file alias="spinner-027">res/movies/spinner-027.png</file> + <file alias="spinner-028">res/movies/spinner-028.png</file> + <file alias="spinner-029">res/movies/spinner-029.png</file> + <file alias="spinner-030">res/movies/spinner-030.png</file> + <file alias="spinner-031">res/movies/spinner-031.png</file> + <file alias="spinner-032">res/movies/spinner-032.png</file> + <file alias="spinner-033">res/movies/spinner-033.png</file> + <file alias="spinner-034">res/movies/spinner-034.png</file> + </qresource> + <qresource prefix="/translations"> + <file alias="ach">locale/bitcoin_ach.qm</file> + <file alias="af_ZA">locale/bitcoin_af_ZA.qm</file> + <file alias="ar">locale/bitcoin_ar.qm</file> + <file alias="be_BY">locale/bitcoin_be_BY.qm</file> + <file alias="bg">locale/bitcoin_bg.qm</file> + <file alias="bs">locale/bitcoin_bs.qm</file> + <file alias="ca_ES">locale/bitcoin_ca_ES.qm</file> + <file alias="ca">locale/bitcoin_ca.qm</file> + <file alias="ca@valencia">locale/[email protected]</file> + <file alias="cmn">locale/bitcoin_cmn.qm</file> + <file alias="cs">locale/bitcoin_cs.qm</file> + <file alias="cy">locale/bitcoin_cy.qm</file> + <file alias="da">locale/bitcoin_da.qm</file> + <file alias="de">locale/bitcoin_de.qm</file> + <file alias="el_GR">locale/bitcoin_el_GR.qm</file> + <file alias="en">locale/bitcoin_en.qm</file> + <file alias="eo">locale/bitcoin_eo.qm</file> + <file alias="es_CL">locale/bitcoin_es_CL.qm</file> + <file alias="es_DO">locale/bitcoin_es_DO.qm</file> + <file alias="es_MX">locale/bitcoin_es_MX.qm</file> + <file alias="es">locale/bitcoin_es.qm</file> + <file alias="es_UY">locale/bitcoin_es_UY.qm</file> + <file alias="et">locale/bitcoin_et.qm</file> + <file alias="eu_ES">locale/bitcoin_eu_ES.qm</file> + <file alias="fa_IR">locale/bitcoin_fa_IR.qm</file> + <file alias="fa">locale/bitcoin_fa.qm</file> + <file alias="fi">locale/bitcoin_fi.qm</file> + <file alias="fr_CA">locale/bitcoin_fr_CA.qm</file> + <file alias="fr">locale/bitcoin_fr.qm</file> + <file alias="gl">locale/bitcoin_gl.qm</file> + <file alias="gu_IN">locale/bitcoin_gu_IN.qm</file> + <file alias="he">locale/bitcoin_he.qm</file> + <file alias="hi_IN">locale/bitcoin_hi_IN.qm</file> + <file alias="hr">locale/bitcoin_hr.qm</file> + <file alias="hu">locale/bitcoin_hu.qm</file> + <file alias="id_ID">locale/bitcoin_id_ID.qm</file> + <file alias="it">locale/bitcoin_it.qm</file> + <file alias="ja">locale/bitcoin_ja.qm</file> + <file alias="ka">locale/bitcoin_ka.qm</file> + <file alias="kk_KZ">locale/bitcoin_kk_KZ.qm</file> + <file alias="ko_KR">locale/bitcoin_ko_KR.qm</file> + <file alias="ky">locale/bitcoin_ky.qm</file> + <file alias="la">locale/bitcoin_la.qm</file> + <file alias="lt">locale/bitcoin_lt.qm</file> + <file alias="lv_LV">locale/bitcoin_lv_LV.qm</file> + <file alias="mn">locale/bitcoin_mn.qm</file> + <file alias="ms_MY">locale/bitcoin_ms_MY.qm</file> + <file alias="nb">locale/bitcoin_nb.qm</file> + <file alias="nl">locale/bitcoin_nl.qm</file> + <file alias="pam">locale/bitcoin_pam.qm</file> + <file alias="pl">locale/bitcoin_pl.qm</file> + <file alias="pt_BR">locale/bitcoin_pt_BR.qm</file> + <file alias="pt_PT">locale/bitcoin_pt_PT.qm</file> + <file alias="ro_RO">locale/bitcoin_ro_RO.qm</file> + <file alias="ru">locale/bitcoin_ru.qm</file> + <file alias="sah">locale/bitcoin_sah.qm</file> + <file alias="sk">locale/bitcoin_sk.qm</file> + <file alias="sl_SI">locale/bitcoin_sl_SI.qm</file> + <file alias="sq">locale/bitcoin_sq.qm</file> + <file alias="sr">locale/bitcoin_sr.qm</file> + <file alias="sv">locale/bitcoin_sv.qm</file> + <file alias="th_TH">locale/bitcoin_th_TH.qm</file> + <file alias="tr">locale/bitcoin_tr.qm</file> + <file alias="uk">locale/bitcoin_uk.qm</file> + <file alias="ur_PK">locale/bitcoin_ur_PK.qm</file> + <file alias="uz@Cyrl">locale/[email protected]</file> + <file alias="vi">locale/bitcoin_vi.qm</file> + <file alias="vi_VN">locale/bitcoin_vi_VN.qm</file> + <file alias="zh_CN">locale/bitcoin_zh_CN.qm</file> + <file alias="zh_HK">locale/bitcoin_zh_HK.qm</file> + <file alias="zh_TW">locale/bitcoin_zh_TW.qm</file> + </qresource> +</RCC> - }
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/guiutil.cpp
+#if defined(Q_OS_MAC) +extern double NSAppKitVersionNumber; +#if !defined(NSAppKitVersionNumber10_9) +#define NSAppKitVersionNumber10_9 1265 +#endif +#endif +
Small change in bigger file.
+ #if QT_VERSION >= 0x040800 + font.setStyleHint(QFont::Monospace); + #else font.setStyleHint(QFont::TypeWriter); +#endif
Typeface change?
if(!BitcoinUnits::parse(BitcoinUnits::FTC, i->second, &rv.amount))
FTC name interface change
+ ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::FTC, info.amount));
Name change to FTC
+void SubstituteFonts() +{ +#if defined(Q_OS_MAC) +// Background: +// OSX's default font changed in 10.9 and QT is unable to find it with its +// usual fallback methods when building against the 10.7 sdk or lower. +// The 10.8 SDK added a function to let it find the correct fallback font. +// If this fallback is not properly loaded, some characters may fail to +// render correctly. +// +// Solution: If building with the 10.7 SDK or lower and the user's platform +// is 10.9 or higher at runtime, substitute the correct font. This needs to +// happen before the QApplication is created. +#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 + if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_9) + QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); +#endif +#endif +} +
OSX update scrypt related? from Litecoin?
+#elif defined(Q_OS_LINUX)
End extra if
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
src/qt/guiutil.cpp
Second commit
+ widget->setPlaceholderText(QObject::tr("Enter a Feathercoin address (e.g. 6djzFXtrfK8axEpEhSPe5o7YgJ16gFjSw7)"));
name interface change
+ // Convert feathercoin:// to feathercoin: + // Cannot handle this later, because feathercoin:// will cause Qt to see the part after // as host,
comments updated
+ if(uri.startsWith("feathercoin://", Qt::CaseInsensitive)) + uri.replace(0, 13, "feathercoin:"); + QString ret = QString("feathercoin:%1").arg(info.address); + return GetSpecialFolderPath(CSIDL_STARTUP) / "Feathercoin.lnk"; + return GetAutostartDir() / "feathercoin.desktop";
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/optionsmodel.cpp
+ settings.setValue("nDisplayUnit", BitcoinUnits::FTC);
FTC name change
+ if (!settings.contains("strThirdPartyTxUrls")) + settings.setValue("strThirdPartyTxUrls", ""); + strThirdPartyTxUrls = settings.value("strThirdPartyTxUrls", "").toString(); +
Scrypt interface change
+ settings.setValue("nTransactionFee", (qint64)DEFAULT_TRANSACTION_FEE); + case ThirdPartyTxUrls: + return strThirdPartyTxUrls; + case ThirdPartyTxUrls: + if (strThirdPartyTxUrls != value.toString()) { + strThirdPartyTxUrls = value.toString(); + settings.setValue("strThirdPartyTxUrls", strThirdPartyTxUrls); + setRestartRequired(true); + } + break;
Scrypt interface transaction fee setting.
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/3527a5ffa10cda80fb9a2095c6ba394b7cb590ec
src/qt/overviewpage.cpp
+ TxViewDelegate(): QAbstractItemDelegate(), unit(BitcoinUnits::FTC)
FTC name change
+ // update the display unit, to not use the default ("FTC")
Update a comment ?
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
key.cpp
+int CompareBigEndian(const unsigned char *c1, size_t c1len, const unsigned char *c2, size_t c2len) { + while (c1len > c2len) { + if (*c1) + return 1; + c1 + +; + c1len--; + } + while (c2len > c1len) { + if (*c2) + return -1; + c2 + +; + c2len--; + } + while (c1len > 0) { + if (*c1 > *c2) + return 1; + if (*c2 > *c1) + return -1; + c1 + +; + c2 + +; + c1len--; + } + return 0; +} + +// Order of secp256k1's generator minus 1. +const unsigned char vchMaxModOrder[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, + 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, + 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40 +}; + +// Half of the order of secp256k1's generator minus 1. +const unsigned char vchMaxModHalfOrder[32] = { + 0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0x5D,0x57,0x6E,0x73,0x57,0xA4,0x50,0x1D, + 0xDF,0xE9,0x2F,0x46,0x68,0x1B,0x20,0xA0 +}; + +const unsigned char vchZero[0] = {}; +
Update to FTC specific settings
- // it's easy enough to do directly. - static const unsigned char vchMax[32] = { +} - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, - 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, - 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40 - }; - bool fIsZero = true; - for (int i=0; i<32 && fIsZero; i++) - if (vch[i] != 0) - fIsZero = false; - if (fIsZero) - return false; - for (int i=0; i<32; i++) { - if (vch[i] < vchMax[i]) - return true; - if (vch[i] > vchMax[i]) - return false; - } - return true;
Bitcoin code replaced
+ return CompareBigEndian(vch, 32, vchZero, 0) > 0 && + CompareBigEndian(vch, 32, vchMaxModOrder, 32) <= 0; + + bool CKey::CheckSignatureElement(const unsigned char *vch, int len, bool half) { + return CompareBigEndian(vch, len, vchZero, 0) > 0 && + CompareBigEndian(vch, len, half ? vchMaxModHalfOrder : vchMaxModOrder, 32) <= 0; +bool ECC_InitSanityCheck() { + EC_KEY *pkey = EC_KEY_new_by_curve_name(NID_secp256k1); + if(pkey == NULL) + return false; + EC_KEY_free(pkey); + + // TODO Is there more EC functionality that could be missing? + return true; +}
Scrypt interface replacement.
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
key.h
+ // Check whether an element of a signature (r or s) is valid. + static bool CheckSignatureElement(const unsigned char *vch, int len, bool half); +/** Check that required EC support is available at runtime */ +bool ECC_InitSanityCheck(void); +
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
src/qt/addressbookpage.cpp
+ ui->labelExplanation->setText(tr("These are your Feathercoin addresses for sending payments. Always check the amount and the receiving address before sending coins.")); + ui->labelExplanation->setText(tr("These are your Feathercoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction."));
Name change FTC
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
wallet.cpp
-#include "checkpoints.h" +#include "checkpoints.h"
Order change for headers?
+ int64_t nTransactionFee = DEFAULT_TRANSACTION_FEE;
Bitcoin code replaced
+static std::vector<CKeyID> vChangeAddresses;
Scrypt code added.
+bool CWallet::LoadCScript(const CScript& redeemScript) +{ + /* A sanity check was added in pull #3843 to avoid adding redeemScripts + * that never can be redeemed. However, old wallets may still contain + * these. Do not add them to the wallet and warn. */ + if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE) + { + std::string strAddr = CBitcoinAddress(redeemScript.GetID()).ToString(); + LogPrintf("%s: Warning: This wallet contains a redeemScript of size %i which exceeds maximum size %i thus can never be redeemed. Do not use address %s.\n", + __func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, strAddr); + return true; + } + + return CCryptoKeyStore::AddCScript(redeemScript); +} +
Scrypt code added.
+ mapWallet[hash].BindWallet(this);
Scrypt code included
+ LOCK2(cs_main, cs_wallet);
Lock interface changes x6
+ // send change to one of the specified change addresses, if specified at init + else if (vChangeAddresses.size()) + { + CKeyID keyID = vChangeAddresses[GetRandInt(vChangeAddresses.size())]; + scriptChange.SetDestination(keyID); + } + + // send change to newly generated address
Scrypt change rules
+ LogPrintf("keypool added key %d, size=%u\n", nEnd, setKeyPool.size());
Log interface charge
+ +// Add an address to the list of fixed change addresses to use. Fixed +// addresses can be used to reduce the pace at which wallets expand +// due to number of change addresses +void AddFixedChangeAddress(const CKeyID &changeAddress) +{ + vChangeAddresses.push_back(changeAddress); +}
Scrypt interface change
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
wallet.h
+// -paytxfee default +static const int64_t DEFAULT_TRANSACTION_FEE = 0;
Additional
+static const int nHighTransactionFeeWarning = 0.05 * COIN;
Bitcoin code replaced
- nWalletVersion = FEATURE_BASE; - nWalletMaxVersion = FEATURE_BASE; - fFileBacked = false; - nMasterKeyMaxID = 0; - pwalletdbEncryption = NULL; - nOrderPosNext = 0; - nNextResend = 0; - nLastResend = 0; - nWalletVersion = FEATURE_BASE; - nWalletMaxVersion = FEATURE_BASE;
Bitcoin code removed
+ SetNull();
Scrypt interface additions set null function.
+ } + void SetNull() + { + nWalletVersion = FEATURE_BASE; + nWalletMaxVersion = FEATURE_BASE; + fFileBacked = false; + nTimeFirstKey = 0;
Scrypt interface code added
+ bool LoadCScript(const CScript& redeemScript);
Bitcoin code replaced.
+ READWRITE(LIMITED_STRING(strComment, 65536)); + READWRITE(LIMITED_STRING(strOtherAccount, 65536)); + READWRITE(LIMITED_STRING(strComment, 65536));
Bitcoin code replaced.
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
https://github.com/FeatherCoin/Feathercoin/commit/30516a6ce8d723cc3d8eb624e2d30431843f01a0
walletdb.cpp
- if (CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()) - wtx.BindWallet(pwallet); - else return false; return false; - // Undo serialize changes in 31600 - if (31404 <= wtx.fTimeReceivedIsTxTime && wtx.fTimeReceivedIsTxTime <= 31703) - { - if (!ssValue.empty()) - { - char fTmp; - char fUnused; - ssValue >> fTmp >> fUnused >> wtx.strFromAccount; - strErr = strprintf("LoadWallet() upgrading tx ver=%d %d '%s' %s", - wtx.fTimeReceivedIsTxTime, fTmp, wtx.strFromAccount, hash.ToString()); - wtx.fTimeReceivedIsTxTime = fTmp; - } - else - { - strErr = strprintf("LoadWallet() repairing tx ver=%d %s", wtx.fTimeReceivedIsTxTime, hash.ToString()); - wtx.fTimeReceivedIsTxTime = 0; - } - wss.vWalletUpgrade.push_back(hash); - } -
Bitcoin code removed
+ if (!(CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()))
Scrypt code replaces
- // Rewrite encrypted wallets of versions 0.4.0 and 0.5.0rc: - if (wss.fIsEncrypted && (wss.nFileVersion == 40000 || wss.nFileVersion == 50000)) - return DB_NEED_REWRITE; -
Bitcoin Code removed
- RenameThread("bitcoin-wallet"); + RenameThread("feathercoin-wallet");
Bitcoin code replaced
- LogPrintf("Salvage(aggressive) found %"PRIszu" records\n", salvagedData.size()); + LogPrintf("Salvage(aggressive) found %u records\n", salvagedData.size());
Bitcoin code replaced