aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-01 15:56:10 +0800
committerobscuren <geffobscura@gmail.com>2014-07-01 15:56:10 +0800
commit39263b674c1a8a13a1c29349a48b3cdc4c5948db (patch)
tree367eb50aa4ba4568f51861feb89294255500d220
parent5f5910c603c107ceaf5f240f9ca23cbf9c951f67 (diff)
downloadgo-tangerine-39263b674c1a8a13a1c29349a48b3cdc4c5948db.tar
go-tangerine-39263b674c1a8a13a1c29349a48b3cdc4c5948db.tar.gz
go-tangerine-39263b674c1a8a13a1c29349a48b3cdc4c5948db.tar.bz2
go-tangerine-39263b674c1a8a13a1c29349a48b3cdc4c5948db.tar.lz
go-tangerine-39263b674c1a8a13a1c29349a48b3cdc4c5948db.tar.xz
go-tangerine-39263b674c1a8a13a1c29349a48b3cdc4c5948db.tar.zst
go-tangerine-39263b674c1a8a13a1c29349a48b3cdc4c5948db.zip
Paranoia
-rw-r--r--ethchain/state_transition.go2
-rw-r--r--ethutil/config.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/ethchain/state_transition.go b/ethchain/state_transition.go
index b18091691..6837f92f7 100644
--- a/ethchain/state_transition.go
+++ b/ethchain/state_transition.go
@@ -268,7 +268,7 @@ func (self *StateTransition) Eval(script []byte, context *StateObject) (ret []by
}
*/
- Paranoia := true // TODO Create a flag for this
+ Paranoia := ethutil.Config.Paranoia
if Paranoia {
var (
trie = context.state.trie
diff --git a/ethutil/config.go b/ethutil/config.go
index b253aa203..6ebb5e8cd 100644
--- a/ethutil/config.go
+++ b/ethutil/config.go
@@ -14,6 +14,7 @@ type config struct {
ExecPath string
Debug bool
+ Paranoia bool
Ver string
ClientString string
Pubkey []byte
@@ -44,7 +45,7 @@ func ReadConfig(ConfigFile string, Datadir string, Identifier string, EnvPrefix
} else {
g.ParseAll()
}
- Config = &config{ExecPath: Datadir, Debug: true, Ver: "0.5.15", conf: g, Identifier: Identifier}
+ Config = &config{ExecPath: Datadir, Debug: true, Ver: "0.5.15", conf: g, Identifier: Identifier, Paranoia: true}
Config.SetClientString("Ethereum(G)")
}
return Config