Blackcoin Lore
This commit is contained in:
@@ -24,7 +24,7 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex*
|
||||
cache[pindexPrev] = THRESHOLD_DEFINED;
|
||||
break;
|
||||
}
|
||||
if (pindexPrev->GetMedianTimePast() < nTimeStart) {
|
||||
if (pindexPrev->GetPastTimeLimit() < nTimeStart) {
|
||||
// Optimizaton: don't recompute down further, as we know every earlier block will be before the start time
|
||||
cache[pindexPrev] = THRESHOLD_DEFINED;
|
||||
break;
|
||||
@@ -45,15 +45,15 @@ ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex*
|
||||
|
||||
switch (state) {
|
||||
case THRESHOLD_DEFINED: {
|
||||
if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) {
|
||||
if (pindexPrev->GetPastTimeLimit() >= nTimeTimeout) {
|
||||
stateNext = THRESHOLD_FAILED;
|
||||
} else if (pindexPrev->GetMedianTimePast() >= nTimeStart) {
|
||||
} else if (pindexPrev->GetPastTimeLimit() >= nTimeStart) {
|
||||
stateNext = THRESHOLD_STARTED;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case THRESHOLD_STARTED: {
|
||||
if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) {
|
||||
if (pindexPrev->GetPastTimeLimit() >= nTimeTimeout) {
|
||||
stateNext = THRESHOLD_FAILED;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user