mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00
Fix linter findings (#178)
* [linter] Fix unnecessary conversion (unconvert) * [linter] Fix fmt.Sprintf can be replaced with faster strconv.FormatInt (perfsprint) Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
parent
9662389446
commit
682796b3c8
@ -106,7 +106,7 @@ func (k Keeper) GetDistributionForReissuedTokens(ctx sdk.Context, blockHeight in
|
||||
var overallAmount uint64
|
||||
for index, obj := range reissuances {
|
||||
if (index == 0 && lastPoP == 0 && obj.BlockHeight == 0) || //corner case (beginning of he chain)
|
||||
(int64(lastPoP) < int64(obj.BlockHeight) && int64(obj.BlockHeight) <= blockHeight) {
|
||||
(lastPoP < obj.BlockHeight && obj.BlockHeight <= blockHeight) {
|
||||
amount, err := getUint64FromTxString(ctx, obj.Rawtx)
|
||||
if err == nil {
|
||||
overallAmount = overallAmount + amount
|
||||
|
@ -22,7 +22,7 @@ func createNDistributionOrder(keeper *keeper.Keeper, ctx sdk.Context, n int) []t
|
||||
items[i].DaoAddr = fmt.Sprintf("DAO%v", i)
|
||||
items[i].DaoAmount = fmt.Sprintf("%v", float64(amount)*types.PercentageDao)
|
||||
items[i].InvestorAddr = fmt.Sprintf("INVESTOR%v", i)
|
||||
items[i].InvestorAmount = fmt.Sprintf("%v", int64(float64(amount)*types.PercentageInvestor))
|
||||
items[i].InvestorAmount = strconv.FormatInt(int64(float64(amount)*types.PercentageInvestor), 10)
|
||||
items[i].PopAddr = fmt.Sprintf("POP%v", i)
|
||||
items[i].PopAmount = fmt.Sprintf("%v", float64(amount)*types.PercentagePop)
|
||||
keeper.StoreDistributionOrder(ctx, items[i])
|
||||
|
Loading…
x
Reference in New Issue
Block a user