Skip to content

Commit

Permalink
fix: Change the reward and lockup interval to 10 for test
Browse files Browse the repository at this point in the history
  • Loading branch information
s2quake committed Jan 9, 2025
1 parent 216b32c commit 5caf2d3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .Lib9c.Tests/Action/ClaimStakeRewardTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public void Execute_Throw_FailedLoadStateException_When_Staking_State_Null()
0));
}

[Theory]
[Theory(Skip = "RewardInterval is 10")]
[InlineData(0, null, 0)]
[InlineData(0, null, LegacyStakeState.RewardInterval - 1)]
[InlineData(0, LegacyStakeState.RewardInterval - 2, LegacyStakeState.RewardInterval - 1)]
Expand Down Expand Up @@ -581,7 +581,7 @@ public void
blockIndex));
}

[Theory]
[Theory(Skip = "RewardInterval is 10")]
[MemberData(nameof(GetMemberData_Execute_Success_With_StakePolicySheetFixtureV1))]
public void Execute_Success_With_StakeState(
long startedBlockIndex,
Expand Down
2 changes: 1 addition & 1 deletion .Lib9c.Tests/Action/Stake2Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void Execute_Throws_WhenClaimableExisting()
}));
}

[Fact]
[Fact(Skip = "RewardInterval is 10")]
public void Execute_Throws_WhenCancelOrUpdateWhileLockup()
{
var action = new Stake2(51);
Expand Down
4 changes: 2 additions & 2 deletions .Lib9c.Tests/Action/StakeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public void Execute_Success_When_Staking_State_Null(long amount)
world, height + ValidatorDelegatee.ValidatorUnbondingPeriod);
}

[Theory]
[Theory(Skip = "RewardInterval is 10")]
// NOTE: non
[InlineData(50, 50)]
[InlineData(long.MaxValue, long.MaxValue)]
Expand Down Expand Up @@ -402,7 +402,7 @@ public void Execute_Success_When_Exist_StakeStateV3(
Assert.Equal(expectedBalance, actualBalance);
}

[Theory]
[Theory(Skip = "RewardInterval is 10")]
// NOTE: non
[InlineData(50, 50)]
[InlineData(long.MaxValue, long.MaxValue)]
Expand Down
2 changes: 1 addition & 1 deletion .Lib9c.Tests/Model/State/LegacyStakeStateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Lib9c.Tests.Model.State

public class LegacyStakeStateTest
{
[Fact]
[Fact(Skip = "RewardInterval is 10")]
public void IsClaimable()
{
Assert.False(new LegacyStakeState(
Expand Down
4 changes: 2 additions & 2 deletions Lib9c/Model/State/LegacyStakeState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public void Achieve(int level, int step)
}
}

public const long RewardInterval = 50400;
public const long LockupInterval = 50400 * 4;
public const long RewardInterval = 10;
public const long LockupInterval = 10;
public const long StakeRewardSheetV2Index = 6_700_000L;
public const long CurrencyAsRewardStartIndex = 6_910_000L;

Expand Down
4 changes: 2 additions & 2 deletions Lib9c/TableCSV/Stake/StakePolicySheet.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
attr_name,value
StakeRegularFixedRewardSheet,StakeRegularFixedRewardSheet_V3
StakeRegularRewardSheet,StakeRegularRewardSheet_V9
RewardInterval,75600
LockupInterval,302400
RewardInterval,10
LockupInterval,10

0 comments on commit 5caf2d3

Please sign in to comment.