Skip to content

Commit

Permalink
Megacoin Core 10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Knöpke committed Sep 23, 2017
1 parent c8b32cf commit ae56f3f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/pow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ unsigned int static KimotoGravityWell2(const CBlockIndex* pindexLast, const CBlo
double EventHorizonDeviation;
double EventHorizonDeviationFast;
double EventHorizonDeviationSlow;
int KGW3_var = 550000;
int KGW3_var = 999999999;
// int64_t LastBlockTime = 0;
if (BlockLastSolved == NULL || BlockLastSolved->nHeight == 0 || (uint64_t)BlockLastSolved->nHeight < PastBlocksMin) { return bnProofOfWorkLimit.GetCompact(); }

Expand Down Expand Up @@ -160,7 +160,7 @@ unsigned int static KimotoGravityWell2(const CBlockIndex* pindexLast, const CBlo
bnNew *= PastRateActualSeconds;
bnNew /= PastRateTargetSeconds;
}

// KGW3 Securty Option 1 Limx Dev 26-11-2015 Not used !
/*
if(LastBlockTime > 0){
Expand All @@ -178,45 +178,45 @@ unsigned int static KimotoGravityWell2(const CBlockIndex* pindexLast, const CBlo
bnNew *= nActualTimespan;
bnNew /= PastRateTargetSeconds;
*/



// Limxdev cgminer-0 KGW3 VAR Diff Break version 2 Limx Dev 7-12-2015
// LogPrintf("Prediff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
// Reduce difficulty if current block generation time has already exceeded maximum time limit.
const int nLongTimeLimit = 1 * 60 * 60;
const int nLongTimeLimit = 1 * 60 * 60;
LogPrintf("prediff %d \n", nLongTimeLimit);//LogPrintf(" %d Block", BlockReading->nHeight );
int aaa = pblock-> nTime - pindexLast->GetBlockTime();
LogPrintf("Time since last Block - %d \n", aaa);
if (BlockReading->nHeight > KGW3_var){
if (BlockReading->nHeight > KGW3_var){
if ((pblock-> nTime - pindexLast->GetBlockTime()) > nLongTimeLimit ) // 1 hours
{
{
const int nLongTimebnNew = 2; bnNew = bnNew * nLongTimebnNew;
LogPrintf("<MEC> KGW3 1h cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
LogPrintf("<MEC> KGW3 1h cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
}
if ((pblock-> nTime - pindexLast->GetBlockTime()) > nLongTimeLimit *2) // 2 hours
{
if ((pblock-> nTime - pindexLast->GetBlockTime()) > nLongTimeLimit *2) // 2 hours
{
const int nLongTimebnNew = 3; bnNew = bnNew * nLongTimebnNew;
LogPrintf("<MEC> KGW3 1h cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
LogPrintf("<MEC> KGW3 1h cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
}
if ((pblock-> nTime - pindexLast->GetBlockTime()) > nLongTimeLimit *3) // 3 hours
{
if ((pblock-> nTime - pindexLast->GetBlockTime()) > nLongTimeLimit *3) // 3 hours
{
const int nLongTimebnNew = 4; bnNew = bnNew * nLongTimebnNew;
LogPrintf("<MEC> KGW3 1h - cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
LogPrintf("<MEC> KGW3 1h - cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
}
if ((pblock-> nTime - pindexLast->GetBlockTime()) > nLongTimeLimit *4) // 4 hours
{
{
const int nLongTimebnNew = 5; bnNew = bnNew * nLongTimebnNew;
LogPrintf("<MEC> KGW3 3h - cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
LogPrintf("<MEC> KGW3 3h - cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
}
if ((pblock-> nTime - pindexLast->GetBlockTime()) > nLongTimeLimit *5) // Backupfunction after 5 hours
{
if ((pblock-> nTime - pindexLast->GetBlockTime()) > nLongTimeLimit *5) // Backupfunction after 5 hours
{
const int nLongTimebnNew = 100; bnNew = bnNew * nLongTimebnNew;
LogPrintf("<MEC> KGW3 5h - cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
LogPrintf("<MEC> KGW3 5h - cute diff %08x %s\n", bnNew.GetCompact(), bnNew.ToString().c_str());
}
}



if (bnNew > bnProofOfWorkLimit) { bnNew = bnProofOfWorkLimit; }

Expand Down
Binary file added src/qt/res/images/splash.xcf
Binary file not shown.

0 comments on commit ae56f3f

Please sign in to comment.