[Dev] Documenting Feathercoin Specific Software settings - Part 18
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
increased protocol version. Fixed issue #158 :: commit
Currenty all 0.9.x.x versions of the client use the protocol version number 70003.
Starting v0.9.6 this number should be 70004 to determine between software versions supporting block version 2 only and software versions supporting block version 2 and version 4https://github.com/FeatherCoin/Feathercoin/commit/30421cdec28f339bb859e44117b90dc8d28c1cc3
src/version.h
-static const int PROTOCOL_VERSION = 70003; +static const int PROTOCOL_VERSION = 70004;
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
add message/alert if to warning. fixed issue #157 :: commit
Warnings and alerts are shown in the top area of the gui’s overview window.
It would be nice to have the message id number displayed for referencehttps://github.com/FeatherCoin/Feathercoin/commit/30b1116dc63ae231856b15a46c342c781bd087aa
src/main.cpp
- strStatusBar = alert.strStatusBar; + strStatusBar = strprintf("%s: #%s\n",alert.strStatusBaralert.nID);
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
updated version string, set release flag to false :: commit
https://github.com/FeatherCoin/Feathercoin/commit/41e464281d41a7be241febb52e9f75dd1b4929db
-define(_CLIENT_VERSION_BUILD, 0) +define(_CLIENT_VERSION_BUILD, 1) -define(_CLIENT_VERSION_IS_RELEASE, true) +define(_CLIENT_VERSION_IS_RELEASE, false)
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Updated release version and Copyright year :: commit
https://github.com/FeatherCoin/Feathercoin/commit/e665b440fe599312fa95eb28f16d6c3aae86c56a
src/clientversion.h
-#define CLIENT_VERSION_REVISION 3 +#define CLIENT_VERSION_REVISION 6 -#define CLIENT_VERSION_BUILD 99 +#define CLIENT_VERSION_BUILD 1
Code replace
-#define COPYRIGHT_YEAR 2016 +#define COPYRIGHT_YEAR 2017
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Updated release version and Copyright year :: commit
https://github.com/FeatherCoin/Feathercoin/commit/e665b440fe599312fa95eb28f16d6c3aae86c56a
src/clientversion.h
+#define CLIENT_VERSION_REVISION 6 +#define CLIENT_VERSION_BUILD 1 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE false // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source +#define COPYRIGHT_YEAR 2017
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
fixed windows static builds and fixed windows deploy :: commit
https://github.com/FeatherCoin/Feathercoin/commit/bf5573a01f2afe13812b3529a18ac53bce18a9e2
+ # -static is interpreted by libtool, where it has a different meaning. + # In libtool-speak, it's -all-static. + AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"; LIBTOOL_LDFLAGS="$LIBTOOL_LDFLAGS -static"]) + +AC_SUBST(LIBTOOL_LDFLAGS)
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Generalise the FTC readme to 0.9.6.x as current :: commit
Generalise the FTC readme to 0.9.6.x as current release line (from 0.9.3.x
https://github.com/FeatherCoin/Feathercoin/commit/bf5573a01f2afe13812b3529a18ac53bce18a9e2
+Status - Feathercoin 0.9.6.x production release version line.
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Update COPYING :: commit
https://github.com/FeatherCoin/Feathercoin/commit/fc65887c8178d31ad056942543222aceb725ebf0
COPYING
+Copyright (c) 2009-2017 Bitcoin Developers +Copyright (c) 2013-2017 Feathercoin Developers
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Update README.md :: commit
https://github.com/FeatherCoin/Feathercoin/commit/621d969382a2101866e1ce7363c430a41ab74763
-[![Build Status](https://travis-ci.org/bitcoin/bitcoin.svg?branch=master)](https://travis-ci.org/bitcoin/bitcoin) -https://bitcoincore.org -completely stable. [Tags](https://github.com/bitcoin/bitcoin/tags) are created +completely stable. [Tags](https://github.com/Feathercoin/Feathercoin/tags) are created regularly to indicate new official, stable release versions of Bitcoin Core. The contribution workflow is described in [CONTRIBUTING.md](CONTRIBUTING.md). -The developer [mailing list](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev) -should be used to discuss complicated or controversial changes before working -on a patch set. -Developer IRC can be found on Freenode at #bitcoin-core-dev. -Translations ------------- - -Changes to translations as well as new translations can be submitted to -[Bitcoin Core's Transifex page](https://www.transifex.com/projects/p/bitcoin/). - -Translations are periodically pulled from Transifex and merged into the git repository. See the -[translation process](doc/translation_process.md) for details on how this works. - -**Important**: We do not accept translation changes as GitHub pull requests because the next -pull from Transifex would automatically overwrite them again. - -Translators should also subscribe to the [mailing list](https://groups.google.com/forum/#!forum/bitcoin-translators).
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
implementation of sendalert to 0.9.6 partial :: commit
https://github.com/FeatherCoin/Feathercoin/commit/a3a27ad3fa8603e95231c4f10a94eeeccc9819d7
src/rpcnet.cpp
+// Send alert (first introduced in ppcoin) +// There is a known deadlock situation with ThreadMessageHandler +// ThreadMessageHandler: holds cs_vSend and acquiring cs_main in SendMessages() +// ThreadRPCServer: holds cs_main and acquiring cs_vSend in alert.RelayTo()/PushMessage()/BeginMessage() +Value sendalert(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 6) + throw runtime_error( + "sendalert <message> <privatekey> <minver> <maxver> <priority> <id> [cancelupto]\n" + "<message> is the alert text message\n" + "<privatekey> is base58 hex string of alert master private key\n" + "<minver> is the minimum applicable internal client version\n" + "<maxver> is the maximum applicable internal client version\n" + "<priority> is integer priority number\n" + "<id> is the alert id\n" + "[cancelupto] cancels all alert id's up to this number\n" + "Returns true or false."); + + // Prepare the alert message + CAlert alert; + alert.strStatusBar = params[0].get_str(); + alert.nMinVer = params[2].get_int(); + alert.nMaxVer = params[3].get_int(); + alert.nPriority = params[4].get_int(); + alert.nID = params[5].get_int(); + if (params.size() > 6) + alert.nCancel = params[6].get_int(); + alert.nVersion = PROTOCOL_VERSION; + alert.nRelayUntil = GetAdjustedTime() + 365*24*60*60; + alert.nExpiration = GetAdjustedTime() + 365*24*60*60; + + CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION); + sMsg << (CUnsignedAlert)alert; + alert.vchMsg = vector<unsigned char>(sMsg.begin(), sMsg.end()); + + // Prepare master key and sign alert message + CBitcoinSecret vchSecret; + if (!vchSecret.SetString(params[1].get_str())) + throw runtime_error("Invalid alert master key"); + CKey key = vchSecret.GetKey(); // if key is not correct openssl may crash + if (!key.Sign(Hash(alert.vchMsg.begin(), alert.vchMsg.end()), alert.vchSig)) + throw runtime_error( + "Unable to sign alert, check alert master key?\n"); + + // Process alert + if(!alert.ProcessAlert()) + throw runtime_error( + "Failed to process alert.\n"); + + // Relay alert + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + alert.RelayTo(pnode); + } + + Object result; + result.push_back(Pair("strStatusBar", alert.strStatusBar)); + result.push_back(Pair("nVersion", alert.nVersion)); + result.push_back(Pair("nMinVer", alert.nMinVer)); + result.push_back(Pair("nMaxVer", alert.nMaxVer)); + result.push_back(Pair("nPriority", alert.nPriority)); + result.push_back(Pair("nID", alert.nID)); + if (alert.nCancel > 0) + result.push_back(Pair("nCancel", alert.nCancel)); + return result; +}
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
implementation of sendalert to 0.9.6 partial :: commit
https://github.com/FeatherCoin/Feathercoin/commit/a3a27ad3fa8603e95231c4f10a94eeeccc9819d7
src/rpcserver.h
+extern json_spirit::Value sendalert(const json_spirit::Array& params, bool fHelp);
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Clause to apply bug fix to windows builds only. :: commit
Clause to apply bug fix to windows builds only.
Also fixes static builds in windows
https://github.com/FeatherCoin/Feathercoin/commit/ad4dd88bbea990a1505bdc1990360e66a33a0bc7
- # -static is interpreted by libtool, where it has a different meaning. - # In libtool-speak, it's -all-static. - AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"; LIBTOOL_LDFLAGS="$LIBTOOL_LDFLAGS -static"]) + # the below fixes a bug in windows static builds. + if test x$Q_OS_WIN; then + AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"; LIBTOOL_LDFLAGS="$LIBTOOL_LDFLAGS -static"]) + AC_MSG_NOTICE([NOTICE: You're building for Windows]) + fi +
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Key refactor for Message/Alert system :: commit
https://github.com/FeatherCoin/Feathercoin/commit/dab8f3d75bc7e77c5fa6b84dada57e59469c28c3
src/rpcnet.cpp
+ bool fCompressed; Code added - CKey key = vchSecret.GetKey(); // if key is not correct openssl may crash + CKey key; + CSecret secret = vchSecret.GetSecret(fCompressed); + key.SetSecret(secret, fCompressed); // if key is not correct openssl may crash
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Added “sendalert” command to rpc server :: commit
https://github.com/FeatherCoin/Feathercoin/commit/ff028cb85cb395b6e7f82c0bace7ec9f9ae36cd4
src/rpcserver.cpp
+ { "sendalert", &sendalert, true, false, true },
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Added “sendalert” command to rpc server :: commit
https://github.com/FeatherCoin/Feathercoin/commit/ff028cb85cb395b6e7f82c0bace7ec9f9ae36cd4
src/rpcserver.h
+extern json_spirit::Value sendalert(const json_spirit::Array& params, bool fHelp);
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fixed missing comma. :: commit
Fixed missing " , "
Fixed missing comma.
https://github.com/FeatherCoin/Feathercoin/commit/f07974c819f67f9a74a78e6f5ee29ed8a602aa8f
src/main.cpp
- // Find the fork (从pindexOldTip退到pindexNew) + // Find the fork (从pindexOldTip退到pindexNew)
comment?
- // List of what to disconnect (从pindexOldTip退到pindexNew=pfork) + // List of what to disconnect (从pindexOldTip退到pindexNew=pfork)
Code replaced
// Feathercoin: temporarily disable v2 block lockin until we are ready for v2 transition - // 1000个中有750个新版本 + // 1000个中有750个新版本
Code replaced
- strStatusBar = strprintf("%s: #%s\n",alert.strStatusBaralert.nID); + strStatusBar = strprintf("%s: #%s\n",alert.strStatusBar, alert.nID);
Code replaced
- vRecv >> checkpoint; //收到的检查点 + vRecv >> checkpoint; //收到的检查点
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Added “sendalert” command :: commit
https://github.com/FeatherCoin/Feathercoin/commit/35aff2ddc2f4ef76d1e2fe20758b769110078e34
src/rpcclient.cpp
+ if (strMethod == "sendalert" && n > 2) ConvertTo<boost::int64_t>(params[2]); + if (strMethod == "sendalert" && n > 3) ConvertTo<boost::int64_t>(params[3]); + if (strMethod == "sendalert" && n > 4) ConvertTo<boost::int64_t>(params[4]); + if (strMethod == "sendalert" && n > 5) ConvertTo<boost::int64_t>(params[5]); + if (strMethod == "sendalert" && n > 6) ConvertTo<boost::int64_t>(params[6]);
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
No wallet is needed for send alert command. :: commit
https://github.com/FeatherCoin/Feathercoin/commit/a1c5801cb73a56660f0613fb562d779bd93e3189
src/rpcclient.cpp
- { "sendalert", &sendalert, true, false, true }, + { "sendalert", &sendalert, true, false, false },
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
updated seed nodes for main net and test net :: commit
https://github.com/FeatherCoin/Feathercoin/commit/63368ece48c5440aa7f472bd898721cec266f991
src/chainparams.cpp
- 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("explorer2.feathercoin.com", "explorer2.feathercoin.com")); + vSeeds.push_back(CDNSSeedData("ftc-c.com", "block.ftc-c.com"));
Code replaced
- vSeeds.push_back(CDNSSeedData("115.29.37.248", "115.29.37.248"));//ftc-c.com - vSeeds.push_back(CDNSSeedData("feathercoin.com", "testnet-dnsseed.feathercoin.com")); + vSeeds.push_back(CDNSSeedData("explorer2.feathercoin.com","feathercoin.com")); + vSeeds.push_back(CDNSSeedData("testnet-dnsseed.feathercoin.com","feathercoin.com"));
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Enabled sendalert for 0.9.6 :: commit
https://github.com/FeatherCoin/Feathercoin/commit/27211496f66b87db57212593c6782a678fdf2089
src/chainparams.cpp
- vAlertPubKey = ParseHex("04302390343f91cc401d56d68b123028bf52e5fca1939df127f63c6467cdf9c8e2c14b61104cf817d0b780da337893ecc4aaff1309e536162dabbdb45200ca2b0a"); + vAlertPubKey = ParseHex("04e7b36458cb1db28567a99391109bc55a0c55623836d93d8794db6549dcc590012d1f5e23c786b752650dadce34fe5504dd7332450392eeb8292e62b211920c78");
Code replaced