Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLEEC_OLD: exception to fix following the notarizations #637

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,9 @@ const CChainParams::CCheckpointData GetACCheckPoints()
// Check for GLEEC chain with old and new parameters
if (chainName.ToString() == "GLEEC") {
if (ASSETCHAINS_SUPPLY == 210000000 && ASSETCHAINS_STAKED == 100) { /* old GLEEC */
ClearDatadirCache();
chainName = assetchain("GLEEC_OLD"); /* exception to fix following notarizations,
we shouldn't do things like that! */
return checkpointDataGLEECOld;
}
return checkpointDataDefault; // TODO: return new checkpoints, when we will have enough data
Expand Down
9 changes: 9 additions & 0 deletions src/komodo_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,15 @@ void komodo_args(char *argv0)
uint16_t nonz=0; // keep track of # CCs enabled
int32_t extralen = 0;

// prevent start old GLEEC chain without datadir specify
if (GetArg("-ac_name","") == "GLEEC" && GetArg("-ac_supply",10) == 210000000 && GetArg("-ac_staked",0) == 100) {
if (mapArgs.count("-datadir") == 0) {
const std::string strOldGLEECStartUpError = "It's mandatory to launch old GLEEC chain with -datadir specify!";
DeckerSU marked this conversation as resolved.
Show resolved Hide resolved
std::cerr << strOldGLEECStartUpError << std::endl;
throw std::runtime_error(strOldGLEECStartUpError);
}
}

const std::string ntz_dest_path = GetArg("-notary", "");
IS_KOMODO_NOTARY = ntz_dest_path == "" ? 0 : 1;

Expand Down
Loading