Skip to content

Commit

Permalink
chore: prevent typo error
Browse files Browse the repository at this point in the history
  • Loading branch information
limebell committed Mar 26, 2024
1 parent 8d6d406 commit 520bba6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Lib9c.DPoS.Tests/DistributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions Lib9c.DPoS/Control/AllocateReward.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ FungibleAssetValue powerDenom
= (validatorRewardSum * powerNumer.RawValue)

Check warning on line 153 in Lib9c.DPoS/Control/AllocateReward.cs

View workflow job for this annotation

GitHub Actions / typos

"Numer" should be "Number".
.DivRem(powerDenom.RawValue);
var (commission, _)
= (validatorReward * Validator.CommissionNumer)
.DivRem(Validator.CommissionDenom);
= (validatorReward * Validator.CommissionNumerator)
.DivRem(Validator.CommissionDenominator);

FungibleAssetValue delegationRewardSum = validatorReward - commission;

Expand Down
4 changes: 2 additions & 2 deletions Lib9c.DPoS/Model/Validator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions Lib9c.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mimisbrunnr/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Minterless/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nekoyume/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Redelegation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=RUNESTONE/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Soulstone/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tradable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unbonded/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unbonding/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Undelegation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unequip/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unrender/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

0 comments on commit 520bba6

Please sign in to comment.