move typedef

This commit is contained in:
ValarDragon 2018-10-31 10:11:41 -07:00
parent 5e2efd999a
commit 835315dcaa
1 changed files with 5 additions and 6 deletions

View File

@ -22,12 +22,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
type blockSimFn func(
r *rand.Rand,
app *baseapp.BaseApp, ctx sdk.Context,
accounts []Account, header abci.Header, logWriter func(string),
) (opCount int)
// Simulate tests application by sending random messages.
func Simulate(t *testing.T, app *baseapp.BaseApp,
appStateFn func(r *rand.Rand, accs []Account) json.RawMessage,
@ -202,6 +196,11 @@ func SimulateFromSeed(tb testing.TB, app *baseapp.BaseApp,
return nil
}
type blockSimFn func(
r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context,
accounts []Account, header abci.Header, logWriter func(string),
) (opCount int)
// Returns a function to simulate blocks. Written like this to avoid constant parameters being passed everytime, to minimize
// memory overhead
func createBlockSimulator(testingMode bool, tb testing.TB, t *testing.T,