fix: various errors from linter (#481)

This commit is contained in:
Kevin Davis 2020-05-01 14:13:29 -04:00 committed by GitHub
parent 03717ad0fa
commit 8f3858509a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 12 deletions

View File

@ -70,5 +70,4 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k Keeper) {
} }
k.SetPreviousSavingsDistribution(ctx, ctx.BlockTime()) k.SetPreviousSavingsDistribution(ctx, ctx.BlockTime())
} }
return
} }

View File

@ -334,7 +334,6 @@ func (k Keeper) SetDebtDenom(ctx sdk.Context, denom string) {
} }
store := prefix.NewStore(ctx.KVStore(k.key), types.DebtDenomKey) store := prefix.NewStore(ctx.KVStore(k.key), types.DebtDenomKey)
store.Set([]byte{}, k.cdc.MustMarshalBinaryLengthPrefixed(denom)) store.Set([]byte{}, k.cdc.MustMarshalBinaryLengthPrefixed(denom))
return
} }
// SetGovDenom set the denom of the governance token in the system // SetGovDenom set the denom of the governance token in the system
@ -344,7 +343,6 @@ func (k Keeper) SetGovDenom(ctx sdk.Context, denom string) {
} }
store := prefix.NewStore(ctx.KVStore(k.key), types.GovDenomKey) store := prefix.NewStore(ctx.KVStore(k.key), types.GovDenomKey)
store.Set([]byte{}, k.cdc.MustMarshalBinaryLengthPrefixed(denom)) store.Set([]byte{}, k.cdc.MustMarshalBinaryLengthPrefixed(denom))
return
} }
// ValidateCollateral validates that a collateral is valid for use in cdps // ValidateCollateral validates that a collateral is valid for use in cdps

View File

@ -200,7 +200,7 @@ func (k Keeper) calculatePayment(ctx sdk.Context, owed sdk.Coin, fees sdk.Coin,
feePayment := sdk.NewCoin(payment.Denom, sdk.ZeroInt()) feePayment := sdk.NewCoin(payment.Denom, sdk.ZeroInt())
principalPayment := sdk.NewCoin(payment.Denom, sdk.ZeroInt()) principalPayment := sdk.NewCoin(payment.Denom, sdk.ZeroInt())
overpayment := sdk.NewCoin(payment.Denom, sdk.ZeroInt()) var overpayment sdk.Coin
if !payment.Amount.IsPositive() { if !payment.Amount.IsPositive() {
return feePayment, principalPayment return feePayment, principalPayment
} }

View File

@ -60,9 +60,6 @@ var (
PreviousDistributionTimeKey = []byte{0x08} PreviousDistributionTimeKey = []byte{0x08}
) )
var lenPositiveDec = len(SortableDecBytes(sdk.OneDec()))
var lenNegativeDec = len(SortableDecBytes(sdk.OneDec().Neg()))
// GetCdpIDBytes returns the byte representation of the cdpID // GetCdpIDBytes returns the byte representation of the cdpID
func GetCdpIDBytes(cdpID uint64) (cdpIDBz []byte) { func GetCdpIDBytes(cdpID uint64) (cdpIDBz []byte) {
cdpIDBz = make([]byte, 8) cdpIDBz = make([]byte, 8)

View File

@ -79,8 +79,5 @@ func genRandomInflation(r *rand.Rand) sdk.Dec {
func genRandomActive(r *rand.Rand) bool { func genRandomActive(r *rand.Rand) bool {
threshold := 50 threshold := 50
value := simulation.RandIntBetween(r, 1, 100) value := simulation.RandIntBetween(r, 1, 100)
if value > threshold { return value > threshold
return true
}
return false
} }

View File

@ -18,7 +18,6 @@ import (
) )
var ( var (
noOpMsg = simulation.NoOpMsg(types.ModuleName)
btcPrices = []sdk.Dec{} btcPrices = []sdk.Dec{}
bnbPrices = []sdk.Dec{} bnbPrices = []sdk.Dec{}
xrpPrices = []sdk.Dec{} xrpPrices = []sdk.Dec{}