[Dev] Documenting Feathercoin Specific Software settings - Part 18
-
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
-
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/rpcnet.cpp
+#include "alert.h"
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Implementation of new ACP checkpoint :: commit
implementation of new ACP checkpoint, initial commit
https://github.com/FeatherCoin/Feathercoin/commit/b1b2c158c8f13ffdd719c08d58968982f2446b76
src/checkpoints.cpp
+ ( 1593400, uint256("0xe97230c788e7240eb325576810fee62f5162905f63a832f15928b88ac6a938c6"))
Code added
- 1372166807, // * UNIX timestamp of last checkpoint block + 1457105972, // * UNIX timestamp of last checkpoint block - 257285, // * total number of transactions between genesis and last checkpoint + 3361886, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) - 3450.0 // * estimated number of transactions per day after checkpoint + 2150.0 // * estimated number of transactions per day after checkpoint
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Implementation of new ACP checkpoint :: commit
implementation of new ACP checkpoint, initial commit
https://github.com/FeatherCoin/Feathercoin/commit/b1b2c158c8f13ffdd719c08d58968982f2446b76
src/checkpointsync.cpp
//sync-checkpoint master key -const std::string CSyncCheckpoint::strMainPubKey = "04b9ff17f2865bc685456429defb94fcb1ffc44a98703f0d62513fa47e7b76e4c6ab10b59e2c068d45f6a04b47bcee8b0fa50b33bfa53ff279a02863dbf1da6128"; +//const std::string CSyncCheckpoint::strMainPubKey = "04b9ff17f2865bc685456429defb94fcb1ffc44a98703f0d62513fa47e7b76e4c6ab10b59e2c068d45f6a04b47bcee8b0fa50b33bfa53ff279a02863dbf1da6128"; +const std::string CSyncCheckpoint::strMainPubKey = "04810a50a45c847e2b3741cf4db2b678bc98e7a67d9218594fbf2d17cab5e2787b07ea56b3ba527d80a9b203623c637d2257cc849cd0f6710839dfcf34a930b4b0";
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Implementation of new ACP checkpoint :: commit
implementation of new ACP checkpoint, initial commit
https://github.com/FeatherCoin/Feathercoin/commit/b1b2c158c8f13ffdd719c08d58968982f2446b76
src/main.cpp
+ /* Reset checkpoint to last hardened checkpoint + after block 1576929, which has an invalid checkpoint due to 0.9.3.2 failing ACP */ + if (nHeight == 1576940) + ResetSyncCheckpoint();
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Implementation of new ACP checkpoint :: commit
implementation of new ACP checkpoint, initial commit
https://github.com/FeatherCoin/Feathercoin/commit/b1b2c158c8f13ffdd719c08d58968982f2446b76
src/rpcserver.cpp
- { "getcheckpoint", &getcheckpoint, true, false, true }, + { "getcheckpoint", &getcheckpoint, true, false, false }, - { "sendcheckpoint", &sendcheckpoint, true, false, true }, + { "sendcheckpoint", &sendcheckpoint, true, false, false }, - { "enforcecheckpoint", &enforcecheckpoint, true, false, true }, + { "enforcecheckpoint", &enforcecheckpoint, true, false, false }, - { "makekeypair", &makekeypair, true, false, true }, + { "makekeypair", &makekeypair, true, false, false },
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Implemented new ACP keypair :: commit
Implemented new ACP keypair to reset checkpoints to
https://github.com/FeatherCoin/Feathercoin/commit/a0097479244ca53d5a94e23452bc766f16fce17d
src/init.cpp
+ uiInterface.InitMessage(_("Checking ACP ...")); + if (!CheckCheckpointPubKey()) { + strLoadError = _("Checking ACP pubkey failed"); + break; + }
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Implemented new ACP keypair :: commit
Implemented new ACP keypair to reset checkpoints to
https://github.com/FeatherCoin/Feathercoin/commit/a0097479244ca53d5a94e23452bc766f16fce17d
src/main.cpp
- /* Reset checkpoint to last hardened checkpoint - after block 1576929, which has an invalid checkpoint due to 0.9.3.2 failing ACP */ - if (nHeight == 1576940) - ResetSyncCheckpoint();
Code removed