diff --git a/x/cdp/abci.go b/x/cdp/abci.go index 23410150..92781fa0 100644 --- a/x/cdp/abci.go +++ b/x/cdp/abci.go @@ -70,5 +70,4 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k Keeper) { } k.SetPreviousSavingsDistribution(ctx, ctx.BlockTime()) } - return } diff --git a/x/cdp/keeper/cdp.go b/x/cdp/keeper/cdp.go index 7c9fcc5d..e667006b 100644 --- a/x/cdp/keeper/cdp.go +++ b/x/cdp/keeper/cdp.go @@ -334,7 +334,6 @@ func (k Keeper) SetDebtDenom(ctx sdk.Context, denom string) { } store := prefix.NewStore(ctx.KVStore(k.key), types.DebtDenomKey) store.Set([]byte{}, k.cdc.MustMarshalBinaryLengthPrefixed(denom)) - return } // 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.Set([]byte{}, k.cdc.MustMarshalBinaryLengthPrefixed(denom)) - return } // ValidateCollateral validates that a collateral is valid for use in cdps diff --git a/x/cdp/keeper/draw.go b/x/cdp/keeper/draw.go index 1a0b14bc..43ef9ff6 100644 --- a/x/cdp/keeper/draw.go +++ b/x/cdp/keeper/draw.go @@ -200,7 +200,7 @@ func (k Keeper) calculatePayment(ctx sdk.Context, owed sdk.Coin, fees sdk.Coin, feePayment := 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() { return feePayment, principalPayment } diff --git a/x/cdp/types/keys.go b/x/cdp/types/keys.go index 1469ffa5..4dc57b38 100644 --- a/x/cdp/types/keys.go +++ b/x/cdp/types/keys.go @@ -60,9 +60,6 @@ var ( PreviousDistributionTimeKey = []byte{0x08} ) -var lenPositiveDec = len(SortableDecBytes(sdk.OneDec())) -var lenNegativeDec = len(SortableDecBytes(sdk.OneDec().Neg())) - // GetCdpIDBytes returns the byte representation of the cdpID func GetCdpIDBytes(cdpID uint64) (cdpIDBz []byte) { cdpIDBz = make([]byte, 8) diff --git a/x/kavadist/simulation/genesis.go b/x/kavadist/simulation/genesis.go index ebaa2ff7..5b34ecc6 100644 --- a/x/kavadist/simulation/genesis.go +++ b/x/kavadist/simulation/genesis.go @@ -79,8 +79,5 @@ func genRandomInflation(r *rand.Rand) sdk.Dec { func genRandomActive(r *rand.Rand) bool { threshold := 50 value := simulation.RandIntBetween(r, 1, 100) - if value > threshold { - return true - } - return false + return value > threshold } diff --git a/x/pricefeed/simulation/operations.go b/x/pricefeed/simulation/operations.go index f620d172..e441f2a3 100644 --- a/x/pricefeed/simulation/operations.go +++ b/x/pricefeed/simulation/operations.go @@ -18,7 +18,6 @@ import ( ) var ( - noOpMsg = simulation.NoOpMsg(types.ModuleName) btcPrices = []sdk.Dec{} bnbPrices = []sdk.Dec{} xrpPrices = []sdk.Dec{}