[Dev] Documenting Feathercoin Specific Software settings - Part 11
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix testnet : - commit
https://github.com/FeatherCoin/Feathercoin/commit/3dfb61d3f4da68a7195148ae8f42f402a660a6eb
src/main.cpp
- unsigned int nTxnOut = 0; + //unsigned int nTxnOut = 0;
Code is commented out… review
- LOCK(cs_main); - CBlockIndex *pindexOldTip = chainActive.Tip(); - bool fComplete = false; - while (!fComplete) { - FindMostWorkChain(); - fComplete = true; - - // Check whether we have something to do. - if (chainMostWork.Tip() == NULL) break; - - // Disconnect active blocks which are no longer in the best chain. - while (chainActive.Tip() && !chainMostWork.Contains(chainActive.Tip())) { - if (!DisconnectTip(state)) - return false; - } - - // Connect new blocks. - while (!chainActive.Contains(chainMostWork.Tip())) { - CBlockIndex *pindexConnect = chainMostWork[chainActive.Height() + 1]; - //if (!ConnectTip(state, pindexConnect)) { - if (!ConnectTip(state, pindexNew)) { - if (state.IsInvalid()) { - // The block violates a consensus rule. - if (!state.CorruptionPossible()) - InvalidChainFound(chainMostWork.Tip()); - fComplete = false; - state = CValidationState(); - break; - } else { - // A system error occurred (disk space, database error, ...). - return false; - } - } - } - } - - if (chainActive.Tip() != pindexOldTip) { - std::string strCmd = GetArg("-blocknotify", ""); - if (!IsInitialBlockDownload() && !strCmd.empty()) - { - boost::replace_all(strCmd, "%s", chainActive.Tip()->GetBlockHash().GetHex()); - boost::thread t(runCommand, strCmd); // thread runs free - } - } -
Code removed
- if (nHeight==INT_MAX) { - if (!::CheckProofOfWork(GetPoWHashS(), nBits)) { - if (!::CheckProofOfWork(GetPoWHash(), nBits)) - { - LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); - return error("CBlockHeader::CheckProofOfWork() GetPoWHash: INT_MAX proof of work failed."); - } - return true; - } - - if (nHeight>=nForkFour) - { - if (!::CheckProofOfWork(GetPoWHash(), nBits)) - { - LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); - return error("CBlockHeader::CheckProofOfWork() GetPoWHash: proof of work failed."); - } } else { - if (!::CheckProofOfWork(GetPoWHashS(), nBits)) - { - LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHashS, nHeight=%i \n",nHeight); - return error("CBlockHeader::CheckProofOfWork() GetPoWHashS: proof of work failed."); - } - }
Code removed
+ if (TestNet()) { + //work in testnet + if (nHeight>=10) { + if (!::CheckProofOfWork(GetPoWHash(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHash: proof of work failed."); + } + } + else + { + if (!::CheckProofOfWork(GetPoWHashS(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHashS, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHashS: proof of work failed."); + } + //work in mainnet + if (nHeight==INT_MAX) + { + if (!::CheckProofOfWork(GetPoWHashS(), nBits)) + { + if (!::CheckProofOfWork(GetPoWHash(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHash: INT_MAX proof of work failed."); + } + } + return true; + } + if (nHeight>=nForkFour) + { + if (!::CheckProofOfWork(GetPoWHash(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHash: proof of work failed."); + } + } + else + { + if (!::CheckProofOfWork(GetPoWHashS(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHashS, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHashS: proof of work failed."); + } + } + }
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix testnet : - commit
https://github.com/FeatherCoin/Feathercoin/commit/3dfb61d3f4da68a7195148ae8f42f402a660a6eb
src/main.h
-static const char* OPENNAME_MAGIC_BYTES_MAINSET="08";
Code removed
+//static const char* OPENNAME_MAGIC_BYTES_MAINSET="08"; +static const unsigned char OPENNAME_MAGIC_BYTES_MAINSET=0x08; +//static const char* OPENNAME_MAGIC_BYTES_TESTSET="88"; +static const unsigned char OPENNAME_MAGIC_BYTES_TESTSET=0x88;
Code added / commented out
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fix testnet sync : - commit
https://github.com/FeatherCoin/Feathercoin/commit/137eae9b45843c03db3e95be96b25c1be813d104
src/main.cpp
+ if (nHeight==INT_MAX) + { + if (!::CheckProofOfWork(GetPoWHashS(), nBits)) + { + if (!::CheckProofOfWork(GetPoWHash(), nBits)) + { + LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHash: INT_MAX proof of work failed."); + } + } + return true; +
Code added
- LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash, nHeight=%i \n",nHeight); - return error("CBlockHeader::CheckProofOfWork() GetPoWHash: proof of work failed.");
Code removed
+ LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash in testnet, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHash in testnet: proof of work failed.");
Code replaced
+ LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHashS in testnet, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHashS in testnet: proof of work failed.");
Code replaced
+ LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHash in mainnet, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHash in mainnet: proof of work failed.");
Code replaced
+ LogPrintf("CBlockHeader::CheckProofOfWork(),GetPoWHashS in mainnet, nHeight=%i \n",nHeight); + return error("CBlockHeader::CheckProofOfWork() GetPoWHashS in mainnet: proof of work failed.");
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Added support for xzing library, removed qr-encode : - commit
Moved to new autogen.sh
https://github.com/FeatherCoin/Feathercoin/commit/ceebac0b95cd6acbf2127d8879aeb51f383d3f1b
.gitignore
-bitcoin-qt -Bitcoin-Qt.app
Code removed
+feathercoin-qt +Feathercoin-Qt.app
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Added support for xzing library, removed qr-encode : - commit
Moved to new autogen.sh
https://github.com/FeatherCoin/Feathercoin/commit/ceebac0b95cd6acbf2127d8879aeb51f383d3f1b
-srcdir="$(dirname $0)" -cd "$srcdir" -autoreconf --install --force
Code removed
+autoreconf -if --warnings=all
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Added support for xzing library, removed qr-encode : - commit
Moved to new autogen.sh
https://github.com/FeatherCoin/Feathercoin/commit/ceebac0b95cd6acbf2127d8879aeb51f383d3f1b
-define(_USE_ZXING,0)
removed code
-AC_ARG_WITH([qrencode], - [AS_HELP_STRING([--with-qrencode], - [enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
Code removed
+AC_ARG_WITH([qrcode], + [AS_HELP_STRING([--with-qrcode], + [enable QR code support (default is yes if qt is enabled and libzxing is found)])],
Code added
+ AX_CHECK_COMPILE_FLAG([-fPIC],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIC" && CFLAGS="$CFLAGS -fPIC"])
Code added
- BITCOIN_FIND_BDB51
Code removed
+ dnl BITCOIN_FIND_BDB51 + BITCOIN_FIND_BDB48
Code replaced
- BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
Code removed
+ dnl libzxing has no module entry, so check without modules + BITCOIN_QT_CHECK([AC_CHECK_LIB([zxing], [main],, [have_zxing=no])])
Code replaced
- BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],, [have_qrencode=no])]) - BITCOIN_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)])
Code removed
+ BITCOIN_QT_CHECK([AC_CHECK_LIB([zxing], [main],, BITCOIN_QT_FAIL(libzxing not found))]) + BITCOIN_QT_CHECK([AC_CHECK_HEADER([zxing.h],, have_qzxing=no)])
Code replaced
+ if test x$have_zxing = xno; then + if test x$use_zxing == xyes; then + AC_MSG_ERROR("QR support requested but cannot be built. use --without-zxing")
Code replaced
+ AC_DEFINE([USE_ZXING],[1],[Define if QR support should be compiled in]) + use_zxing=yes
Code replaced
+AM_CONDITIONAL([USE_ZXING], [test x$use_qr = xyes])
Code replaced
-AC_DEFINE(USE_ZXING, _USE_ZXING,[Define to 0 libzxing must be available for support])
Code removed
+AC_SUBST(USE_ZXING)
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Adapted documentation to feathercoin : - commit
Documentation
https://github.com/FeatherCoin/Feathercoin/commit/2a7cdd81fbed144a7eee8beca09615f77945322d
doc/Doxyfile
+PROJECT_NAME = Feathercoin +PROJECT_NUMBER = 0.9.3 +PROJECT_LOGO = doc/feathercoin_logo_doxygen.png
Code replaced : note : Put on release todo list as version number change?
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Adapted documentation to feathercoin : - commit
Documentation
https://github.com/FeatherCoin/Feathercoin/commit/2a7cdd81fbed144a7eee8beca09615f77945322d
doc/*
Update various docs for Feathercoin specific information, build requirements, copyrights
doc/README.md
Review for Release Todo : various Versions and copyrights to check on release.
doc/README_windows.txt
Various Feathercoin name changes
doc/assets-attribution.md
Various Feathercoin name changes, IP address changes
doc/bitcoin_logo_doxygen.png
Deleted file
doc/coding.md
Name changes
doc/multiwallet-qt.md
+In order to support loading of multiple wallets in feathercoin-qt, a few changes in the UI architecture will be needed.
Various name changes, inc Feathercoingui
doc/release-process.md
Various name version numbers
doc/tor.md
Name changes
doc/translation_process.md
Name changes
doc/unit-tests.md
Name changes
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Adapted documentation to feathercoin : - commit
Documentation
https://github.com/FeatherCoin/Feathercoin/commit/2a7cdd81fbed144a7eee8beca09615f77945322d
src/bitcoin-config.h
Updates for Libxing no 32bit?
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ -#define HAVE_DECL_STRERROR_R 0 +#define HAVE_DECL_STRERROR_R 1
Code replaced
/* Define to 1 if you have the `advapi32' library (-ladvapi32). */ +/* #undef HAVE_LIBADVAPI32 */ +/* #undef HAVE_LIBCOMCTL32 */ +/* #undef HAVE_LIBCOMDLG32 */ +/* #undef HAVE_LIBCRYPT32 */ +/* #undef HAVE_LIBCRYPTO */ +/* #undef HAVE_LIBGDI32 */ +/* #undef HAVE_LIBIMM32 */ +/* #undef HAVE_LIBIPHLPAPI */ +/* #undef HAVE_LIBKERNEL32 */ +/* #undef HAVE_LIBMINGWTHRD */ +/* #undef HAVE_LIBMSWSOCK */ +/* #undef HAVE_LIBOLE32 */ +/* #undef HAVE_LIBOLEAUT32 */ +/* #undef HAVE_LIBPNG_ */ +/* #undef HAVE_LIBPROTOBUF_ */ +/* #undef HAVE_LIBRPCRT4 */ +/* #undef HAVE_LIBSHELL32 */ +/* #undef HAVE_LIBSHLWAPI */ +/* #undef HAVE_LIBSSL */ +/* #undef HAVE_LIBUSER32 */ +/* #undef HAVE_LIBUUID */ +/* #undef HAVE_LIBWINMM */ +/* #undef HAVE_LIBWINSPOOL */ +/* #undef HAVE_LIBWS2_32 */ + +/* Define to 1 if you have the `zxing' library (-lzxing). */ +#define HAVE_LIBZXING 1 +/* #undef HAVE_LIBZ_ */ +#define HAVE_MSG_NOSIGNAL 1 +#define HAVE_STRERROR_R 1 +/* #undef QT_STATICPLUGIN */ +#define STRERROR_R_CHAR_P 1 +#define USE_DBUS 1 +/* Define if QR support should be compiled in */ +#define USE_ZXING 1
Code replaced or commented out
+/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif
Code added comments
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Adapted documentation to feathercoin : - commit
Documentation
https://github.com/FeatherCoin/Feathercoin/commit/2a7cdd81fbed144a7eee8beca09615f77945322d
src/qt/bitcoingui.cpp
+ QPalette palette; + palette.setBrush(QPalette::Background,QBrush(Qt::lightGray)); + toolbar->setPalette(palette); + toolbar->setAutoFillBackground(true);
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Adapted documentation to feathercoin : - commit
Documentation
https://github.com/FeatherCoin/Feathercoin/commit/2a7cdd81fbed144a7eee8beca09615f77945322d
src/qt/forms/overviewpage.ui
User interface changes
+ <property name="windowIcon"> + <iconset resource="../feathercoin.qrc"> + <normaloff>:/icons/bitcoin</normaloff>:/icons/bitcoin</iconset> + </property> + <property name="autoFillBackground"> + <bool>true</bool> + </property>
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Adapted documentation to feathercoin : - commit
Documentation
https://github.com/FeatherCoin/Feathercoin/commit/2a7cdd81fbed144a7eee8beca09615f77945322d
src/qt/res/images/*
src/qt/res/images/mainbg.png src/qt/res/images/splash.png
image files updates note, updated subsequently
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Add seeder and correct format : - commit
https://github.com/FeatherCoin/Feathercoin/commit/a677f8fd3943a18fa893f3d1a9e9924a3c722559
src/chainparams.cpp
- vSeeds.push_back(CDNSSeedData("ftc-c.com", "www.ftc-c.com")); - vSeeds.push_back(CDNSSeedData("block.ftc-c.com", "block.ftc-c.com")); - vSeeds.push_back(CDNSSeedData("pool.ftc-c.com", "pool.ftc-c.com"));
Code replaced
+ vSeeds.push_back(CDNSSeedData("ftc-c.com", "www.ftc-c.com")); + vSeeds.push_back(CDNSSeedData("ftc-c.com", "block.ftc-c.com")); + vSeeds.push_back(CDNSSeedData("ftc-c.com", "pool.ftc-c.com")); + vSeeds.push_back(CDNSSeedData("alltheco.in", "dnsseed.alltheco.in"));
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
moved checkpoint console messages to be logged instead : - commit
first implementation to support 3 and f prefixes for multisig addresses
https://github.com/FeatherCoin/Feathercoin/commit/59d479863ca8848791efdb3ea67f423e9b92d816
src/base58.cpp
- vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS); + vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS) || + vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS_OLD);
Code replaced
- else if (vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS)) + else if (vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS) || + vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS_OLD))
Code replaced
- return IsValid() && vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS); + return IsValid() && (vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS) || + vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS_OLD));
Code replaced
- if (!IsValid() || vchVersion != Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS)) + if (!IsValid() || (vchVersion != Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS) && + vchVersion != Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS_OLD)))
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
moved checkpoint console messages to be logged instead : - commit
first implementation to support 3 and f prefixes for multisig addresses
https://github.com/FeatherCoin/Feathercoin/commit/59d479863ca8848791efdb3ea67f423e9b92d816
src/chainparams.cpp
- //base58Prefixes[SCRIPT_ADDRESS] = list_of(5); - base58Prefixes[SCRIPT_ADDRESS] = list_of(96); + base58Prefixes[SCRIPT_ADDRESS_OLD] = list_of(5); + // base58Prefixes[SCRIPT_ADDRESS] = list_of(96); + base58Prefixes[SCRIPT_ADDRESS] = list_of(5);
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
moved checkpoint console messages to be logged instead : - commit
first implementation to support 3 and f prefixes for multisig addresses
https://github.com/FeatherCoin/Feathercoin/commit/59d479863ca8848791efdb3ea67f423e9b92d816
src/chainparams.h
+ SCRIPT_ADDRESS_OLD,
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
moved checkpoint console messages to be logged instead : - commit
first implementation to support 3 and f prefixes for multisig addresses
https://github.com/FeatherCoin/Feathercoin/commit/59d479863ca8848791efdb3ea67f423e9b92d816
src/checkpointsync.cpp
- printf("AcceptPendingSyncCheckpoint : sync-checkpoint at %s\n", hashSyncCheckpoint.ToString().c_str()); + if (fDebug) + LogPrintf("AcceptPendingSyncCheckpoint : sync-checkpoint at %s\n", hashSyncCheckpoint.ToString().c_str());
Code replaced
- printf("ResetSyncCheckpoint: SetBestChain to hardened checkpoint %s\n", hash.ToString().c_str()); + if (fDebug) + LogPrintf("ResetSyncCheckpoint: SetBestChain to hardened checkpoint %s\n", hash.ToString().c_str()); + if (fDebug) + LogPrintf("ResetSyncCheckpoint: pending for sync-checkpoint %s\n", hashPendingCheckpoint.ToString().c_str()); + if (fDebug) + LogPrintf("ResetSyncCheckpoint: sync-checkpoint reset to %s\n", hashSyncCheckpoint.ToString().c_str()); + if (fDebug) + LogPrintf("ResetSyncCheckpoint: sync-checkpoint reset to %s\n", hashSyncCheckpoint.ToString().c_str()); + if (fDebug) { + LogPrintf("ProcessSyncCheckpoint: pending for sync-checkpoint %s\n", hashCheckpoint.ToString().c_str()); + } + if (fDebug) + LogPrintf("ProcessSyncCheckpoint: sync-checkpoint at %s\n", hashCheckpoint.ToString().c_str());
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
syntax in #include : - commit
https://github.com/FeatherCoin/Feathercoin/commit/bef3a6d5ae76f6a0d915bab623f11abfc9b03c7e
src/qt/snapwidget.cpp
-#include <zxing/common/GlobalHistogramBinarizer.h> +#include "zxing/common/GlobalHistogramBinarizer.h"
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
fine tuning for libzxing config check : - commit
https://github.com/FeatherCoin/Feathercoin/commit/a4f5bf1e5688a7ca68733e6b937797a21603fc9a
.gitignore
+src/bitcoin-config.h
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
fine tuning for libzxing config check : - commit
https://github.com/FeatherCoin/Feathercoin/commit/a4f5bf1e5688a7ca68733e6b937797a21603fc9a
+ AC_DEFINE([USE_QR],[1],[Define if QR support should be compiled in]) + use_qr=yes
Code added