Skip to content

Commit 820fe50

Browse files
DeckerSUsmk762
andauthored
GLEEC_OLD: exception to fix following the notarizations (#637)
* GLEEC_OLD: exception to fix following the notarizations This configuration assumes that we have the `~/.komodo/GLEEC_OLD` directory for the old GLEEC chain. The daemon should be launched with `-datadir=$HOME/.komodo/GLEEC_OLD`, and the data directory should contain `GLEEC.conf` along with a symlink to it named `GLEEC_OLD.conf`. * timeshifting transient verb --------- Co-authored-by: smk762 <[email protected]>
1 parent bf8ace3 commit 820fe50

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/chainparams.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,9 @@ const CChainParams::CCheckpointData GetACCheckPoints()
951951
// Check for GLEEC chain with old and new parameters
952952
if (chainName.ToString() == "GLEEC") {
953953
if (ASSETCHAINS_SUPPLY == 210000000 && ASSETCHAINS_STAKED == 100) { /* old GLEEC */
954+
ClearDatadirCache();
955+
chainName = assetchain("GLEEC_OLD"); /* exception to fix following notarizations,
956+
we shouldn't do things like that! */
954957
return checkpointDataGLEECOld;
955958
}
956959
return checkpointDataDefault; // TODO: return new checkpoints, when we will have enough data

src/komodo_utils.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,15 @@ void komodo_args(char *argv0)
10061006
uint16_t nonz=0; // keep track of # CCs enabled
10071007
int32_t extralen = 0;
10081008

1009+
// prevent starting old GLEEC chain without datadir specified
1010+
if (GetArg("-ac_name","") == "GLEEC" && GetArg("-ac_supply",10) == 210000000 && GetArg("-ac_staked",0) == 100) {
1011+
if (mapArgs.count("-datadir") == 0) {
1012+
const std::string strOldGLEECStartUpError = "It's mandatory to launch old GLEEC chain with -datadir specified!";
1013+
std::cerr << strOldGLEECStartUpError << std::endl;
1014+
throw std::runtime_error(strOldGLEECStartUpError);
1015+
}
1016+
}
1017+
10091018
const std::string ntz_dest_path = GetArg("-notary", "");
10101019
IS_KOMODO_NOTARY = ntz_dest_path == "" ? 0 : 1;
10111020

0 commit comments

Comments
 (0)