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
This commit is contained in:
@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user