From 6b39d2cafcac3e368c3be0d71c73017738b88ac9 Mon Sep 17 00:00:00 2001 From: Miguel de Elias Date: Thu, 3 Oct 2024 11:39:21 -0300 Subject: [PATCH] fix: subgraph-service tests --- .../horizon/contracts/staking/HorizonStakingExtension.sol | 5 +---- .../test/subgraphService/provision/accept.t.sol | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/horizon/contracts/staking/HorizonStakingExtension.sol b/packages/horizon/contracts/staking/HorizonStakingExtension.sol index d1f08234b..72599e448 100644 --- a/packages/horizon/contracts/staking/HorizonStakingExtension.sol +++ b/packages/horizon/contracts/staking/HorizonStakingExtension.sol @@ -344,10 +344,7 @@ contract HorizonStakingExtension is HorizonStakingBase, IL2StakingBase, IHorizon * @param _tokens Amount of tokens that were transferred * @param _delegationData struct containing the delegator's address and the indexer's address */ - function _receiveDelegation( - uint256 _tokens, - IL2StakingTypes.ReceiveDelegationData memory _delegationData - ) private { + function _receiveDelegation(uint256 _tokens, IL2StakingTypes.ReceiveDelegationData memory _delegationData) private { require(_provisions[_delegationData.indexer][SUBGRAPH_DATA_SERVICE_ADDRESS].createdAt != 0, "!provision"); // Get the delegation pool of the indexer DelegationPoolInternal storage pool = _legacyDelegationPools[_delegationData.indexer]; diff --git a/packages/subgraph-service/test/subgraphService/provision/accept.t.sol b/packages/subgraph-service/test/subgraphService/provision/accept.t.sol index 5d5d25a08..812a27639 100644 --- a/packages/subgraph-service/test/subgraphService/provision/accept.t.sol +++ b/packages/subgraph-service/test/subgraphService/provision/accept.t.sol @@ -22,7 +22,7 @@ contract SubgraphServiceProvisionAcceptTest is SubgraphServiceTest { tokens = bound(tokens, minimumProvisionTokens, MAX_TOKENS); vm.assume(newVerifierCut >= fishermanRewardPercentage); vm.assume(newVerifierCut <= MAX_PPM); - newDisputePeriod = uint64(bound(newDisputePeriod, disputePeriod, MAX_THAWING_PERIOD)); + newDisputePeriod = uint64(bound(newDisputePeriod, disputePeriod, MAX_WAIT_PERIOD)); // Setup indexer _createProvision(users.indexer, tokens, fishermanRewardPercentage, disputePeriod);