This commit is contained in:
JoelKatz
2012-06-05 04:00:25 -07:00
parent 1c854f9c73
commit 79cc39f902

View File

@@ -155,9 +155,9 @@ bool LCTransaction::updatePosition(int seconds)
// To prevent avalanche stalls, we increase the needed weight slightly over time
bool newPosition;
if (seconds <= LEDGER_CONVERGE) newPosition = weight >= AV_MIN_CONSENSUS;
else if (seconds >= LEDGER_FORCE_CONVERGE) newPosition = weight >= AV_MAX_CONSENSUS;
else newPosition = weight >= AV_AVG_CONSENSUS;
if (seconds <= LEDGER_CONVERGE) newPosition = weight > AV_MIN_CONSENSUS;
else if (seconds >= LEDGER_FORCE_CONVERGE) newPosition = weight > AV_MAX_CONSENSUS;
else newPosition = weight > AV_AVG_CONSENSUS;
if (newPosition == mOurPosition) return false;
mOurPosition = newPosition;