Skip to content

Commit

Permalink
Merge pull request #85 from b-harvest/patch/swagger-docs
Browse files Browse the repository at this point in the history
chore: Update swagger docs
  • Loading branch information
dudong2 authored Aug 1, 2024
2 parents ad273f6 + 14d4840 commit 1856a00
Show file tree
Hide file tree
Showing 4 changed files with 400 additions and 10 deletions.
14 changes: 8 additions & 6 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,12 @@ func TestWorkingHash(t *testing.T) {

tmpDir := fmt.Sprintf("test-%s", time.Now().String())
db, err := dbm.NewGoLevelDB("test", tmpDir, nil)
require.NoError(t, err)
app := NewCanto(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, false, simtestutil.NewAppOptionsWithFlagHome(DefaultNodeHome), baseapp.SetChainID("canto_9000-1"))

// delete tmpDir
defer require.NoError(t, os.RemoveAll(tmpDir))

pbparams := gdoc.ConsensusParams.ToProto()
// Initialize the chain
_, err = app.InitChain(&abci.RequestInitChain{
Expand All @@ -127,12 +131,12 @@ func TestWorkingHash(t *testing.T) {
require.NoError(t, err)

storeKeys := app.GetStoreKeys()
// deterministicKeys are module keys which has always same working hash whenever run this test. (non deterministic module: staking)
// deterministicKeys are module keys which has always same working hash whenever run this test. (non deterministic module: staking, epoch, inflation)
deterministicKeys := []string{
authtypes.StoreKey, banktypes.StoreKey, capabilitytypes.StoreKey, coinswaptypes.StoreKey,
consensustypes.StoreKey, crisistypes.StoreKey, distrtypes.StoreKey, epochstypes.StoreKey,
consensustypes.StoreKey, crisistypes.StoreKey, distrtypes.StoreKey,
evmtypes.StoreKey, feemarkettypes.StoreKey, govtypes.StoreKey, ibctransfertypes.StoreKey,
inflationtypes.StoreKey, paramstypes.StoreKey, slashingtypes.StoreKey, upgradetypes.StoreKey}
paramstypes.StoreKey, slashingtypes.StoreKey, upgradetypes.StoreKey}
// workingHashWithZeroInitialHeight is the working hash of the IAVL store with initial height 0 with given genesis.
// you can get this hash by running the test with iavl v1.1.2 with printing working hash (ref. https://github.com/b-harvest/cosmos-sdk/commit/4f44d6a2fe80ee7fe8c4409b820226e3615c6500)
workingHashWithZeroInitialHeight := map[string]string{
Expand Down Expand Up @@ -192,9 +196,7 @@ func TestWorkingHash(t *testing.T) {
require.True(t, ok)
workingHash := hex.EncodeToString(iavlStore.WorkingHash())
require.NotEqual(t, workingHashWithZeroInitialHeight[key.Name()], workingHash)
require.Equal(t, workingHashWithCorrectInitialHeight[key.Name()], workingHash)
require.Equal(t, workingHashWithCorrectInitialHeight[key.Name()], workingHash, key.Name())
}
}
// delete tmpDir
require.NoError(t, os.RemoveAll(tmpDir))
}
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit 1856a00

Please sign in to comment.