Skip to content

Commit

Permalink
freeze fork values during a fork
Browse files Browse the repository at this point in the history
  • Loading branch information
nuevoalex committed Jun 13, 2019
1 parent 4454ba6 commit a9560f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -80,6 +80,7 @@ contract Universe is ITyped, IUniverse {
}

function updateForkValues() public returns (bool) {
require(!isForking());
uint256 _totalRepSupply = reputationToken.getTotalTheoreticalSupply();
forkReputationGoal = _totalRepSupply.div(2); // 50% of REP migrating results in a victory in a fork
disputeThresholdForFork = _totalRepSupply.div(40); // 2.5% of the total rep supply
Expand Down
8 changes: 7 additions & 1 deletion packages/augur-core/tests/reporting/test_reporting_misc.py
@@ -1,7 +1,7 @@
from eth_tester.exceptions import TransactionFailed
from utils import captureFilteredLogs, AssertLog, nullAddress
from pytest import raises
from reporting_utils import proceedToNextRound
from reporting_utils import proceedToNextRound, proceedToFork

def test_crowdsourcer_transfer(contractsFixture, market, universe):
proceedToNextRound(contractsFixture, market)
Expand Down Expand Up @@ -53,3 +53,9 @@ def test_malicious_shady_parties(contractsFixture, universe):

maliciousMarketHaver.setMarket(nullAddress)
assert not universe.isContainerForReportingParticipant(maliciousMarketHaver.address)

def test_universe_fork_goal_freeze(contractsFixture, universe, market):
proceedToFork(contractsFixture, market, universe)

with raises(TransactionFailed):
universe.updateForkValues()

0 comments on commit a9560f4

Please sign in to comment.