lotus/chain/validation/config.go

32 lines
477 B
Go
Raw Normal View History

2020-02-27 22:17:08 +00:00
package validation
//
2020-02-28 23:18:37 +00:00
// Config
2020-02-27 22:17:08 +00:00
//
2020-02-28 23:18:37 +00:00
type Config struct {
2020-02-27 22:17:08 +00:00
trackGas bool
checkExitCode bool
checkReturnValue bool
}
2020-02-28 23:18:37 +00:00
func NewConfig(gas, exit, ret bool) *Config {
return &Config{
trackGas: gas,
checkExitCode: exit,
checkReturnValue: ret,
}
}
func (v Config) ValidateGas() bool {
2020-02-27 22:17:08 +00:00
return v.trackGas
}
2020-02-28 23:18:37 +00:00
func (v Config) ValidateExitCode() bool {
2020-02-27 22:17:08 +00:00
return v.checkExitCode
}
2020-02-28 23:18:37 +00:00
func (v Config) ValidateReturnValue() bool {
2020-02-27 22:17:08 +00:00
return v.checkReturnValue
}