mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 00:05:18 +00:00
fix: various errors from linter (#481)
This commit is contained in:
parent
03717ad0fa
commit
8f3858509a
@ -70,5 +70,4 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k Keeper) {
|
||||
}
|
||||
k.SetPreviousSavingsDistribution(ctx, ctx.BlockTime())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
noOpMsg = simulation.NoOpMsg(types.ModuleName)
|
||||
btcPrices = []sdk.Dec{}
|
||||
bnbPrices = []sdk.Dec{}
|
||||
xrpPrices = []sdk.Dec{}
|
||||
|
Loading…
Reference in New Issue
Block a user