diff --git a/Lib9c.DPoS.Tests/DistributeTest.cs b/Lib9c.DPoS.Tests/DistributeTest.cs index 9c50484e87..36b8060e9d 100644 --- a/Lib9c.DPoS.Tests/DistributeTest.cs +++ b/Lib9c.DPoS.Tests/DistributeTest.cs @@ -186,14 +186,14 @@ public void ValidatorSetTest() = (validatorRewardSum * 205) .DivRem(100 + (101 + 200) * 50 - 101 - 102 + 204 + 306); var (commissionA, _) - = (validatorRewardA * Validator.CommissionNumer) - .DivRem(Validator.CommissionDenom); + = (validatorRewardA * Validator.CommissionNumerator) + .DivRem(Validator.CommissionDenominator); var (validatorRewardB, _) = (validatorRewardSum * 307) .DivRem(100 + (101 + 200) * 50 - 101 - 102 + 204 + 306); var (commissionB, _) - = (validatorRewardB * Validator.CommissionNumer) - .DivRem(Validator.CommissionDenom); + = (validatorRewardB * Validator.CommissionNumerator) + .DivRem(Validator.CommissionDenominator); Assert.Equal( Asset.ConsensusToken * 0, diff --git a/Lib9c.DPoS/Control/AllocateReward.cs b/Lib9c.DPoS/Control/AllocateReward.cs index 6cc0039330..1fac7519a3 100644 --- a/Lib9c.DPoS/Control/AllocateReward.cs +++ b/Lib9c.DPoS/Control/AllocateReward.cs @@ -153,8 +153,8 @@ FungibleAssetValue powerDenom = (validatorRewardSum * powerNumer.RawValue) .DivRem(powerDenom.RawValue); var (commission, _) - = (validatorReward * Validator.CommissionNumer) - .DivRem(Validator.CommissionDenom); + = (validatorReward * Validator.CommissionNumerator) + .DivRem(Validator.CommissionDenominator); FungibleAssetValue delegationRewardSum = validatorReward - commission; diff --git a/Lib9c.DPoS/Model/Validator.cs b/Lib9c.DPoS/Model/Validator.cs index da84e75b83..6a56745ffc 100644 --- a/Lib9c.DPoS/Model/Validator.cs +++ b/Lib9c.DPoS/Model/Validator.cs @@ -43,9 +43,9 @@ public Validator(IValue serialized) // May be it would be better to be serialized public static FungibleAssetValue MinSelfDelegation => Asset.ConsensusToken * 1; - public static BigInteger CommissionNumer => 1; + public static BigInteger CommissionNumerator => 1; - public static BigInteger CommissionDenom => 10; + public static BigInteger CommissionDenominator => 10; public static double CommissionMaxRate => 0.2; diff --git a/Lib9c.sln.DotSettings b/Lib9c.sln.DotSettings index f0ba53d29f..a8a315c16f 100644 --- a/Lib9c.sln.DotSettings +++ b/Lib9c.sln.DotSettings @@ -10,8 +10,12 @@ True True True + True True True True + True + True + True True True \ No newline at end of file