Skip to content

Commit

Permalink
fix: subgraph service tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikol committed Oct 3, 2024
1 parent 36e715d commit 0f0c039
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/horizon/test/staking/provision/parameters.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ contract HorizonStakingProvisionParametersTest is HorizonStakingTest {
vm.stopPrank();
}

function test_ProvisionParameters_RevertWhen_InvalidMaxVerifierCut(
function test_ProvisionParameters_RevertIf_InvalidMaxVerifierCut(
uint256 amount,
uint32 maxVerifierCut,
uint64 thawingPeriod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contract SubgraphServiceProvisionAcceptTest is SubgraphServiceTest {
tokens = bound(tokens, minimumProvisionTokens, MAX_TOKENS);
vm.assume(newVerifierCut >= fishermanRewardPercentage);
vm.assume(newVerifierCut <= MAX_PPM);
vm.assume(newDisputePeriod >= disputePeriod);
newDisputePeriod = uint64(bound(newDisputePeriod, disputePeriod, MAX_THAWING_PERIOD));

// Setup indexer
_createProvision(users.indexer, tokens, fishermanRewardPercentage, disputePeriod);
Expand Down Expand Up @@ -58,7 +58,7 @@ contract SubgraphServiceProvisionAcceptTest is SubgraphServiceTest {
uint32 newVerifierCut
) public useIndexer {
tokens = bound(tokens, minimumProvisionTokens, MAX_TOKENS);
vm.assume(newVerifierCut > MAX_PPM);
vm.assume(newVerifierCut < maxSlashingPercentage);

// Setup indexer
_createProvision(users.indexer, tokens, fishermanRewardPercentage, disputePeriod);
Expand Down
2 changes: 1 addition & 1 deletion packages/subgraph-service/test/utils/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ abstract contract Constants {
uint256 internal constant MAX_PPM = 1_000_000;
uint256 internal constant EPOCH_LENGTH = 1;
// Dispute Manager
uint64 internal constant disputePeriod = 300; // 5 minutes
uint64 internal constant disputePeriod = 7 days;
uint256 internal constant disputeDeposit = 100 ether; // 100 GRT
uint32 internal constant fishermanRewardPercentage = 500000; // 50%
uint32 internal constant maxSlashingPercentage = 500000; // 50%
Expand Down

0 comments on commit 0f0c039

Please sign in to comment.