Skip to content

Commit

Permalink
NU name words separated by underscore instead of white space.
Browse files Browse the repository at this point in the history
Github-Pull: PIVX-Project#1747
Rebased-From: 78d4f3a
  • Loading branch information
furszy authored and Fuzzbawls committed Jul 22, 2020
1 parent fc042f1 commit 943d84b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 10 additions & 7 deletions src/consensus/upgrades.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
/**
* General information about each network upgrade.
* Ordered by Consensus::UpgradeIndex.
*
* If the upgrade name has many words, use the '_' character to divide them.
* We are using it in the -nuparams startup arg and input it with spaces is just ugly.
*/
const struct NUInfo NetworkUpgradeInfo[Consensus::MAX_NETWORK_UPGRADES] = {
{
Expand All @@ -19,39 +22,39 @@ const struct NUInfo NetworkUpgradeInfo[Consensus::MAX_NETWORK_UPGRADES] = {
/*.strInfo =*/ "Proof of Stake Consensus activation",
},
{
/*.strName =*/ "PoS v2",
/*.strName =*/ "PoS_v2",
/*.strInfo =*/ "New selection for stake modifier",
},
{
/*.strName =*/ "Zerocoin",
/*.strInfo =*/ "ZeroCoin protocol activation - start block v4",
},
{
/*.strName =*/ "Zerocoin v2",
/*.strName =*/ "Zerocoin_v2",
/*.strInfo =*/ "new zerocoin serials and zPOS start",
},
{
/*.strName =*/ "BIP65",
/*.strInfo =*/ "CLTV (BIP65) activation - start block v5",
},
{
/*.strName =*/ "Zerocoin Public",
/*.strName =*/ "Zerocoin_Public",
/*.strInfo =*/ "activation of zerocoin public spends (spend v3)",
},
{
/*.strName =*/ "PIVX v3.4",
/*.strName =*/ "PIVX_v3.4",
/*.strInfo =*/ "new 256-bit stake modifier - start block v6",
},
{
/*.strName =*/ "PIVX v4.0",
/*.strName =*/ "PIVX_v4.0",
/*.strInfo =*/ "new message sigs - start block v7 - time protocol - zc spend v4",
},
{
/*.strName =*/ "v5 dummy",
/*.strName =*/ "v5_dummy",
/*.strInfo =*/ "Placeholder for future PIVX version 5.0 upgrade",
},
{
/*.strName =*/ "Test dummy",
/*.strName =*/ "Test_dummy",
/*.strInfo =*/ "Test dummy info",
},
};
Expand Down
4 changes: 3 additions & 1 deletion src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,10 @@ void NetworkUpgradeDescPushBack(
// hidden. This is used when network upgrade implementations are merged
// without specifying the activation height.
if (consensusParams.vUpgrades[idx].nActivationHeight != Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT) {
std::string name = NetworkUpgradeInfo[idx].strName;
std::replace(name.begin(), name.end(), '_', ' '); // Beautify the name
networkUpgrades.push_back(Pair(
NetworkUpgradeInfo[idx].strName,
name,
NetworkUpgradeDesc(consensusParams, idx, height)));
}
}
Expand Down

0 comments on commit 943d84b

Please sign in to comment.