Skip to content

Commit

Permalink
Merge branch 'main' into bez/11906-api-mod-vanity
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored May 12, 2022
2 parents 7c11312 + e8851d7 commit b3e1889
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions simapp/simd/cmd/testnet.go
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ func NewTestnetCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBala
return testnetCmd
}

// get cmd to initialize all files for tendermint testnet and application
// testnetInitFilesCmd returns a cmd to initialize all files for tendermint testnet and application
func testnetInitFilesCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator) *cobra.Command {
cmd := &cobra.Command{
Use: "init-files",
@@ -150,7 +150,7 @@ Example:
return cmd
}

// get cmd to start multi validator in-process testnet
// testnetStartCmd returns a cmd to start multi validator in-process testnet
func testnetStartCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "start",
4 changes: 2 additions & 2 deletions simapp/test_helpers.go
Original file line number Diff line number Diff line change
@@ -256,7 +256,7 @@ func SetupWithGenesisAccounts(t *testing.T, genAccs []authtypes.GenesisAccount,
return SetupWithGenesisValSet(t, valSet, genAccs, balances...)
}

// SetupWithGenesisValSet initializes GenesisState with a single validator and genesis accounts
// GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts
// that also act as delegators.
func GenesisStateWithSingleValidator(t *testing.T, app *SimApp) GenesisState {
t.Helper()
@@ -335,7 +335,7 @@ func AddTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sd
return addTestAddrs(app, ctx, accNum, accAmt, createRandomAccounts)
}

// AddTestAddrs constructs and returns accNum amount of accounts with an
// AddTestAddrsIncremental constructs and returns accNum amount of accounts with an
// initial balance of accAmt in random order
func AddTestAddrsIncremental(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress {
return addTestAddrs(app, ctx, accNum, accAmt, createIncrementalAccounts)
14 changes: 13 additions & 1 deletion x/mint/spec/03_begin_block.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,19 @@ order: 3
Minting parameters are recalculated and inflation
paid at the beginning of each block.

## NextInflationRate
## Inflation rate calculation

Inflation rate is calculated using an "inflation calculation function" that's
passed to the `NewAppModule` function. If no function is passed, then the SDK's
default inflation function will be used (`NextInflationRate`). In case a custom
inflation calculation logic is needed, this can be achieved by defining and
passing a function that matches `InflationCalculationFn`'s signature.

```go
type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params, bondedRatio sdk.Dec) sdk.Dec
```

### NextInflationRate

The target annual inflation rate is recalculated each block.
The inflation is also subject to a rate change (positive or negative)

0 comments on commit b3e1889

Please sign in to comment.