cosmos-sdk/testutil/integration/options.go
mergify[bot] 8295e4a3e0
fix: Revert 16794 (backport #16895) (#16896)
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
2023-07-10 08:02:04 +00:00

26 lines
670 B
Go

package integration
// Config is the configuration for the integration app.
type Config struct {
AutomaticFinalizeBlock bool
AutomaticCommit bool
}
// Option is a function that can be used to configure the integration app.
type Option func(*Config)
// WithAutomaticFinalizeBlock calls ABCI finalize block.
func WithAutomaticFinalizeBlock() Option {
return func(cfg *Config) {
cfg.AutomaticFinalizeBlock = true
}
}
// WithAutomaticCommit enables automatic commit.
// This means that the integration app will automatically commit the state after each msgs.
func WithAutomaticCommit() Option {
return func(cfg *Config) {
cfg.AutomaticCommit = true
}
}