mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 15:04:22 +00:00
more config options
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package vm
|
||||
|
||||
import (
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
)
|
||||
|
||||
var config cfg.Config = nil
|
||||
|
||||
func init() {
|
||||
cfg.OnConfig(func(newConfig cfg.Config) {
|
||||
config = newConfig
|
||||
})
|
||||
}
|
||||
@@ -36,14 +36,19 @@ func (err ErrPermission) Error() string {
|
||||
return fmt.Sprintf("Contract does not have permission to %s", err.typ)
|
||||
}
|
||||
|
||||
const (
|
||||
dataStackCapacity = 1024
|
||||
callStackCapacity = 100 // TODO ensure usage.
|
||||
memoryCapacity = 1024 * 1024 // 1 MB
|
||||
)
|
||||
|
||||
type Debug bool
|
||||
|
||||
const (
|
||||
dataStackCapacity = 1024
|
||||
callStackCapacity = 100 // TODO ensure usage.
|
||||
memoryCapacity = 1024 * 1024 // 1 MB
|
||||
dbg Debug = true
|
||||
)
|
||||
var dbg Debug
|
||||
|
||||
func SetDebug(d bool) {
|
||||
dbg = Debug(d)
|
||||
}
|
||||
|
||||
func (d Debug) Printf(s string, a ...interface{}) {
|
||||
if d {
|
||||
|
||||
Reference in New Issue
Block a user