mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 15:55:18 +00:00
chore: fix some comments (#1980)
Signed-off-by: riyueguang <rustruby@outlook.com>
This commit is contained in:
parent
608f70b20a
commit
f229afce1a
@ -431,7 +431,7 @@ func (suite *AssetTestSuite) TestIncrementOutgoingAssetSupply() {
|
|||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"outoing + amount > current",
|
"outgoing + amount > current",
|
||||||
args{
|
args{
|
||||||
coin: c("bnb", 36),
|
coin: c("bnb", 36),
|
||||||
},
|
},
|
||||||
|
@ -201,7 +201,7 @@ func (k Keeper) SynchronizeInterestForRiskyCDPs(ctx sdk.Context, targetRatio sdk
|
|||||||
k.cdc.MustUnmarshal(bz, &cdp)
|
k.cdc.MustUnmarshal(bz, &cdp)
|
||||||
|
|
||||||
if debtParam.Denom != cdp.GetTotalPrincipal().Denom {
|
if debtParam.Denom != cdp.GetTotalPrincipal().Denom {
|
||||||
panic(fmt.Sprintf("unkown debt param %s", cdp.GetTotalPrincipal().Denom))
|
panic(fmt.Sprintf("unknown debt param %s", cdp.GetTotalPrincipal().Denom))
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
proto "github.com/cosmos/gogoproto/proto"
|
proto "github.com/cosmos/gogoproto/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultNextProposalID is the starting poiint for proposal IDs.
|
// DefaultNextProposalID is the starting point for proposal IDs.
|
||||||
const DefaultNextProposalID uint64 = 1
|
const DefaultNextProposalID uint64 = 1
|
||||||
|
|
||||||
// NewGenesisState returns a new genesis state object for the module.
|
// NewGenesisState returns a new genesis state object for the module.
|
||||||
|
@ -98,7 +98,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState {
|
|||||||
}
|
}
|
||||||
previousAccrualTime, f := k.GetPreviousAccrualTime(ctx, mm.Denom)
|
previousAccrualTime, f := k.GetPreviousAccrualTime(ctx, mm.Denom)
|
||||||
if !f {
|
if !f {
|
||||||
// Goverance adds new params at end of block, but mm's previous accrual time is set in begin blocker.
|
// Governance adds new params at end of block, but mm's previous accrual time is set in begin blocker.
|
||||||
// If a new money market is added and chain is exported before begin blocker runs, then the previous
|
// If a new money market is added and chain is exported before begin blocker runs, then the previous
|
||||||
// accrual time will not be found. We can't set it here because our ctx doesn't contain current block
|
// accrual time will not be found. We can't set it here because our ctx doesn't contain current block
|
||||||
// time; if we set it to ctx.BlockTime() then on the next block it could accrue interest from Jan 1st
|
// time; if we set it to ctx.BlockTime() then on the next block it could accrue interest from Jan 1st
|
||||||
|
@ -216,7 +216,7 @@ func TestBasePool_AddLiquidity(t *testing.T) {
|
|||||||
|
|
||||||
actualA, actualB, actualShares := pool.AddLiquidity(tc.desiredA, tc.desiredB)
|
actualA, actualB, actualShares := pool.AddLiquidity(tc.desiredA, tc.desiredB)
|
||||||
|
|
||||||
// assert correct values are retruned
|
// assert correct values are returned
|
||||||
assert.Equal(t, tc.expectedA, actualA, "deposited A liquidity not equal")
|
assert.Equal(t, tc.expectedA, actualA, "deposited A liquidity not equal")
|
||||||
assert.Equal(t, tc.expectedB, actualB, "deposited B liquidity not equal")
|
assert.Equal(t, tc.expectedB, actualB, "deposited B liquidity not equal")
|
||||||
assert.Equal(t, tc.expectedShares, actualShares, "calculated shares not equal")
|
assert.Equal(t, tc.expectedShares, actualShares, "calculated shares not equal")
|
||||||
|
Loading…
Reference in New Issue
Block a user