aboutsummaryrefslogtreecommitdiffstats
path: root/eth/gen_config.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-01-08 20:15:57 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-08 20:15:57 +0800
commit5c2f1e00148f16655d3fb63b93920b1108165c56 (patch)
treef3b453e05a8da60ceb006b5899554f8fbad86cf4 /eth/gen_config.go
parenta139041d409d0ffaf81c7cf931c6b24299a05705 (diff)
downloaddexon-5c2f1e00148f16655d3fb63b93920b1108165c56.tar
dexon-5c2f1e00148f16655d3fb63b93920b1108165c56.tar.gz
dexon-5c2f1e00148f16655d3fb63b93920b1108165c56.tar.bz2
dexon-5c2f1e00148f16655d3fb63b93920b1108165c56.tar.lz
dexon-5c2f1e00148f16655d3fb63b93920b1108165c56.tar.xz
dexon-5c2f1e00148f16655d3fb63b93920b1108165c56.tar.zst
dexon-5c2f1e00148f16655d3fb63b93920b1108165c56.zip
all: update generated code (#15808)
* core/types, core/vm, eth, tests: regenerate gencodec files * Makefile: update devtools target Install protoc-gen-go and print reminders about npm, solc and protoc. Also switch to github.com/kevinburke/go-bindata because it's more maintained. * contracts/ens: update contracts and regenerate with solidity v0.4.19 The newer upstream version of the FIFSRegistrar contract doesn't set the resolver anymore. The resolver is now deployed separately. * contracts/release: regenerate with solidity v0.4.19 * contracts/chequebook: fix fallback and regenerate with solidity v0.4.19 The contract didn't have a fallback function, payments would be rejected when compiled with newer solidity. References to 'mortal' and 'owned' use the local file system so we can compile without network access. * p2p/discv5: regenerate with recent stringer * cmd/faucet: regenerate * dashboard: regenerate * eth/tracers: regenerate * internal/jsre/deps: regenerate * dashboard: avoid sed -i because it's not portable * accounts/usbwallet/internal/trezor: fix go generate warnings
Diffstat (limited to 'eth/gen_config.go')
-rw-r--r--eth/gen_config.go54
1 files changed, 9 insertions, 45 deletions
diff --git a/eth/gen_config.go b/eth/gen_config.go
index e2d50e1f6..92cab57e1 100644
--- a/eth/gen_config.go
+++ b/eth/gen_config.go
@@ -13,6 +13,8 @@ import (
"github.com/ethereum/go-ethereum/eth/gasprice"
)
+var _ = (*configMarshaling)(nil)
+
func (c Config) MarshalTOML() (interface{}, error) {
type Config struct {
Genesis *core.Genesis `toml:",omitempty"`
@@ -20,7 +22,6 @@ func (c Config) MarshalTOML() (interface{}, error) {
SyncMode downloader.SyncMode
LightServ int `toml:",omitempty"`
LightPeers int `toml:",omitempty"`
- MaxPeers int `toml:"-"`
SkipBcVersionCheck bool `toml:"-"`
DatabaseHandles int `toml:"-"`
DatabaseCache int
@@ -28,17 +29,11 @@ func (c Config) MarshalTOML() (interface{}, error) {
MinerThreads int `toml:",omitempty"`
ExtraData hexutil.Bytes `toml:",omitempty"`
GasPrice *big.Int
- EthashCacheDir string
- EthashCachesInMem int
- EthashCachesOnDisk int
- EthashDatasetDir string
- EthashDatasetsInMem int
- EthashDatasetsOnDisk int
+ Ethash ethash.Config
TxPool core.TxPoolConfig
GPO gasprice.Config
EnablePreimageRecording bool
- DocRoot string `toml:"-"`
- PowMode ethash.Mode `toml:"-"`
+ DocRoot string `toml:"-"`
}
var enc Config
enc.Genesis = c.Genesis
@@ -53,17 +48,11 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.MinerThreads = c.MinerThreads
enc.ExtraData = c.ExtraData
enc.GasPrice = c.GasPrice
- enc.EthashCacheDir = c.Ethash.CacheDir
- enc.EthashCachesInMem = c.Ethash.CachesInMem
- enc.EthashCachesOnDisk = c.Ethash.CachesOnDisk
- enc.EthashDatasetDir = c.Ethash.DatasetDir
- enc.EthashDatasetsInMem = c.Ethash.DatasetsInMem
- enc.EthashDatasetsOnDisk = c.Ethash.DatasetsOnDisk
+ enc.Ethash = c.Ethash
enc.TxPool = c.TxPool
enc.GPO = c.GPO
enc.EnablePreimageRecording = c.EnablePreimageRecording
enc.DocRoot = c.DocRoot
- enc.PowMode = c.Ethash.PowMode
return &enc, nil
}
@@ -74,7 +63,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
SyncMode *downloader.SyncMode
LightServ *int `toml:",omitempty"`
LightPeers *int `toml:",omitempty"`
- MaxPeers *int `toml:"-"`
SkipBcVersionCheck *bool `toml:"-"`
DatabaseHandles *int `toml:"-"`
DatabaseCache *int
@@ -82,17 +70,11 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
MinerThreads *int `toml:",omitempty"`
ExtraData hexutil.Bytes `toml:",omitempty"`
GasPrice *big.Int
- EthashCacheDir *string
- EthashCachesInMem *int
- EthashCachesOnDisk *int
- EthashDatasetDir *string
- EthashDatasetsInMem *int
- EthashDatasetsOnDisk *int
+ Ethash *ethash.Config
TxPool *core.TxPoolConfig
GPO *gasprice.Config
EnablePreimageRecording *bool
- DocRoot *string `toml:"-"`
- PowMode *ethash.Mode `toml:"-"`
+ DocRoot *string `toml:"-"`
}
var dec Config
if err := unmarshal(&dec); err != nil {
@@ -134,23 +116,8 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.GasPrice != nil {
c.GasPrice = dec.GasPrice
}
- if dec.EthashCacheDir != nil {
- c.Ethash.CacheDir = *dec.EthashCacheDir
- }
- if dec.EthashCachesInMem != nil {
- c.Ethash.CachesInMem = *dec.EthashCachesInMem
- }
- if dec.EthashCachesOnDisk != nil {
- c.Ethash.CachesOnDisk = *dec.EthashCachesOnDisk
- }
- if dec.EthashDatasetDir != nil {
- c.Ethash.DatasetDir = *dec.EthashDatasetDir
- }
- if dec.EthashDatasetsInMem != nil {
- c.Ethash.DatasetsInMem = *dec.EthashDatasetsInMem
- }
- if dec.EthashDatasetsOnDisk != nil {
- c.Ethash.DatasetsOnDisk = *dec.EthashDatasetsOnDisk
+ if dec.Ethash != nil {
+ c.Ethash = *dec.Ethash
}
if dec.TxPool != nil {
c.TxPool = *dec.TxPool
@@ -164,8 +131,5 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.DocRoot != nil {
c.DocRoot = *dec.DocRoot
}
- if dec.PowMode != nil {
- c.Ethash.PowMode = *dec.PowMode
- }
return nil
}