[Dev] Documenting Feathercoin Specific Software settings - Part 18
-
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
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
fixed Issue #169 :: commit
When the client is configured to checkpointenforce=0 it crashes at startup.
https://github.com/FeatherCoin/Feathercoin/commit/1fe607b3382a0fc7521dbafa089bc66eef7c803a
src/main.cpp
- if (pindexBest->pprev && !CheckSyncCheckpoint(pindexBest->GetBlockHash(), pindexBest->pprev)) + if (pindexNew->pprev && !CheckSyncCheckpoint(pindexNew->GetBlockHash(), pindexNew->pprev))
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Increased protocol version to 70005 :: commit
https://github.com/FeatherCoin/Feathercoin/commit/e6cf22382f626414b75e444d28df565d3caf742f
src/version.h
-static const int PROTOCOL_VERSION = 70004; +static const int PROTOCOL_VERSION = 70005;
Code replaced
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fixed issue #171 :: commit
0.11.2 has a compatibility feature to accept the ‘old’ and the ‘new’ pchmessagestart, so that 0.9.x nodes can successfully connect to a 0.11.x node.
When establishing outgoing connections 0.11.x uses the new pchMessageStart strin only, which is rejected by the 0.9.x nodeshttps://github.com/FeatherCoin/Feathercoin/commit/e6cf22382f626414b75e444d28df565d3caf742f
src/chainparams.cpp
+ pchMessageStartNew[0] = 0xfe; + pchMessageStartNew[1] = 0x46; + pchMessageStartNew[2] = 0x54; + pchMessageStartNew[3] = 0x43;
Code added
+ pchMessageStartNew[0] = 0xaa; + pchMessageStartNew[1] = 0xbb; + pchMessageStartNew[2] = 0xcc; + pchMessageStartNew[3] = 0xdd;
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fixed issue #171 :: commit
The non official release 0.11.2 has a compatibility feature to accept the ‘old’ and the ‘new’ pchmessagestart, so that 0.9.x nodes can successfully connect to a 0.11.x node.
When establishing outgoing connections 0.11.x uses the new pchMessageStart strin only, which is rejected by the 0.9.x nodeshttps://github.com/FeatherCoin/Feathercoin/commit/19f116dec8a1bf1156d03f85aad36e4900318821
src/chainparams.h
+ const MessageStartChars& MessageStartNew() const { return pchMessageStartNew; }
Code added
-
Feathercoin specific changes made to convert Bitcoin to FTC 0.9.6.*
Fixed issue #171 :: commit
The non official release 0.11.2 has a compatibility feature to accept the ‘old’ and the ‘new’ pchmessagestart, so that 0.9.x nodes can successfully connect to a 0.11.x node.
When establishing outgoing connections 0.11.x uses the new pchMessageStart strin only, which is rejected by the 0.9.x nodeshttps://github.com/FeatherCoin/Feathercoin/commit/19f116dec8a1bf1156d03f85aad36e4900318821
src/main.cpp
- if (memcmp(msg.hdr.pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE) != 0) { - LogPrintf("\n\nPROCESSMESSAGE: INVALID MESSAGESTART\n\n"); - fOk = false; - break; - }
Code removed
+ /* Message start detector */ + if ((memcmp(msg.hdr.pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE) != 0) && (memcmp(msg.hdr.pchMessageStart, Params().MessageStartNew(), MESSAGE_START_SIZE) != 0)) { + + LogPrintf("\n\nPROCESSMESSAGE: INVALID MESSAGESTART\n\n"); + fOk = false; + break; + }
Code added