Merge PR #4094: Account for Rounding Errors in Distribution Calculations

This commit is contained in:
frog power 4000
2019-04-10 18:53:42 -04:00
committed by Alexander Bezobchuk
parent ace9910e94
commit 38e3fdfcea
5 changed files with 39 additions and 14 deletions
+1
View File
@@ -75,6 +75,7 @@ type Validator interface {
GetDelegatorShares() Dec // total outstanding delegator shares
TokensFromShares(Dec) Dec // token worth of provided delegator shares
TokensFromSharesTruncated(Dec) Dec // token worth of provided delegator shares, truncated
TokensFromSharesRoundUp(Dec) Dec // token worth of provided delegator shares, rounded up
SharesFromTokens(amt Int) (Dec, Error) // shares worth of delegator's bond
SharesFromTokensTruncated(amt Int) (Dec, Error) // truncated shares worth of delegator's bond
}