diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-04-02 11:17:15 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-04-02 12:22:32 +0800 |
commit | c26c8d3a44cdd45994b6d99777d620565bab8f9c (patch) | |
tree | 6ab5a74981e9fb9f869f1ef884a375163b898113 /generators/defaults.go | |
parent | 516ec28544e0f9c76e18d82742d3ae58cfb59cc1 (diff) | |
download | go-tangerine-c26c8d3a44cdd45994b6d99777d620565bab8f9c.tar.gz go-tangerine-c26c8d3a44cdd45994b6d99777d620565bab8f9c.tar.zst go-tangerine-c26c8d3a44cdd45994b6d99777d620565bab8f9c.zip |
Read most protocol params from common/params.json
* Add params package with exported variables generated from
github.com/ethereum/common/blob/master/params.json
* Use params package variables in applicable places
* Add check for minimum gas limit in validation of block's gas limit
* Remove common/params.json from go-ethereum to avoid
outdated version of it
Diffstat (limited to 'generators/defaults.go')
-rw-r--r-- | generators/defaults.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/generators/defaults.go b/generators/defaults.go index b0c71111c..41d46729c 100644 --- a/generators/defaults.go +++ b/generators/defaults.go @@ -35,13 +35,16 @@ func main() { m := make(map[string]setting) json.Unmarshal(content, &m) - filepath := path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "core", os.Args[2]) + filepath := path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "params", os.Args[2]) output, err := os.OpenFile(filepath, os.O_RDWR|os.O_CREATE, os.ModePerm /*0777*/) if err != nil { fatal("error opening file for writing %v\n", err) } - output.WriteString(`package core + output.WriteString(`// DO NOT EDIT!!! +// AUTOGENERATED FROM generators/defaults.go + +package params import "math/big" |