github.com/letterj/go-ethereum@v1.8.22-0.20190204142846-520024dfd689/eth/gen_config.go (about) 1 // Code generated by github.com/fjl/gencodec. DO NOT EDIT. 2 3 package eth 4 5 import ( 6 "math/big" 7 "time" 8 9 "github.com/ethereum/go-ethereum/common" 10 "github.com/ethereum/go-ethereum/common/hexutil" 11 "github.com/ethereum/go-ethereum/consensus/ethash" 12 "github.com/ethereum/go-ethereum/core" 13 "github.com/ethereum/go-ethereum/eth/downloader" 14 "github.com/ethereum/go-ethereum/eth/gasprice" 15 ) 16 17 var _ = (*configMarshaling)(nil) 18 19 // MarshalTOML marshals as TOML. 20 func (c Config) MarshalTOML() (interface{}, error) { 21 type Config struct { 22 Genesis *core.Genesis `toml:",omitempty"` 23 NetworkId uint64 24 SyncMode downloader.SyncMode 25 NoPruning bool 26 LightServ int `toml:",omitempty"` 27 LightPeers int `toml:",omitempty"` 28 OnlyAnnounce bool 29 ULC *ULCConfig `toml:",omitempty"` 30 SkipBcVersionCheck bool `toml:"-"` 31 DatabaseHandles int `toml:"-"` 32 DatabaseCache int 33 TrieCleanCache int 34 TrieDirtyCache int 35 TrieTimeout time.Duration 36 Etherbase common.Address `toml:",omitempty"` 37 MinerNotify []string `toml:",omitempty"` 38 MinerExtraData hexutil.Bytes `toml:",omitempty"` 39 MinerGasFloor uint64 40 MinerGasCeil uint64 41 MinerGasPrice *big.Int 42 MinerRecommit time.Duration 43 MinerNoverify bool 44 Ethash ethash.Config 45 TxPool core.TxPoolConfig 46 GPO gasprice.Config 47 EnablePreimageRecording bool 48 DocRoot string `toml:"-"` 49 EWASMInterpreter string 50 EVMInterpreter string 51 } 52 var enc Config 53 enc.Genesis = c.Genesis 54 enc.NetworkId = c.NetworkId 55 enc.SyncMode = c.SyncMode 56 enc.NoPruning = c.NoPruning 57 enc.LightServ = c.LightServ 58 enc.LightPeers = c.LightPeers 59 enc.OnlyAnnounce = c.OnlyAnnounce 60 enc.ULC = c.ULC 61 enc.SkipBcVersionCheck = c.SkipBcVersionCheck 62 enc.DatabaseHandles = c.DatabaseHandles 63 enc.DatabaseCache = c.DatabaseCache 64 enc.TrieCleanCache = c.TrieCleanCache 65 enc.TrieDirtyCache = c.TrieDirtyCache 66 enc.TrieTimeout = c.TrieTimeout 67 enc.Etherbase = c.Etherbase 68 enc.MinerNotify = c.MinerNotify 69 enc.MinerExtraData = c.MinerExtraData 70 enc.MinerGasFloor = c.MinerGasFloor 71 enc.MinerGasCeil = c.MinerGasCeil 72 enc.MinerGasPrice = c.MinerGasPrice 73 enc.MinerRecommit = c.MinerRecommit 74 enc.MinerNoverify = c.MinerNoverify 75 enc.Ethash = c.Ethash 76 enc.TxPool = c.TxPool 77 enc.GPO = c.GPO 78 79 enc.EnablePreimageRecording = c.EnablePreimageRecording 80 enc.DocRoot = c.DocRoot 81 enc.EWASMInterpreter = c.EWASMInterpreter 82 enc.EVMInterpreter = c.EVMInterpreter 83 return &enc, nil 84 } 85 86 // UnmarshalTOML unmarshals from TOML. 87 func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { 88 type Config struct { 89 Genesis *core.Genesis `toml:",omitempty"` 90 NetworkId *uint64 91 SyncMode *downloader.SyncMode 92 NoPruning *bool 93 LightServ *int `toml:",omitempty"` 94 LightPeers *int `toml:",omitempty"` 95 OnlyAnnounce *bool 96 ULC *ULCConfig `toml:",omitempty"` 97 SkipBcVersionCheck *bool `toml:"-"` 98 DatabaseHandles *int `toml:"-"` 99 DatabaseCache *int 100 TrieCleanCache *int 101 TrieDirtyCache *int 102 TrieTimeout *time.Duration 103 Etherbase *common.Address `toml:",omitempty"` 104 MinerNotify []string `toml:",omitempty"` 105 MinerExtraData *hexutil.Bytes `toml:",omitempty"` 106 MinerGasFloor *uint64 107 MinerGasCeil *uint64 108 MinerGasPrice *big.Int 109 MinerRecommit *time.Duration 110 MinerNoverify *bool 111 Ethash *ethash.Config 112 TxPool *core.TxPoolConfig 113 GPO *gasprice.Config 114 EnablePreimageRecording *bool 115 DocRoot *string `toml:"-"` 116 EWASMInterpreter *string 117 EVMInterpreter *string 118 } 119 var dec Config 120 if err := unmarshal(&dec); err != nil { 121 return err 122 } 123 if dec.Genesis != nil { 124 c.Genesis = dec.Genesis 125 } 126 if dec.NetworkId != nil { 127 c.NetworkId = *dec.NetworkId 128 } 129 if dec.SyncMode != nil { 130 c.SyncMode = *dec.SyncMode 131 } 132 if dec.NoPruning != nil { 133 c.NoPruning = *dec.NoPruning 134 } 135 if dec.LightServ != nil { 136 c.LightServ = *dec.LightServ 137 } 138 if dec.LightPeers != nil { 139 c.LightPeers = *dec.LightPeers 140 } 141 if dec.OnlyAnnounce != nil { 142 c.OnlyAnnounce = *dec.OnlyAnnounce 143 } 144 if dec.ULC != nil { 145 c.ULC = dec.ULC 146 } 147 if dec.SkipBcVersionCheck != nil { 148 c.SkipBcVersionCheck = *dec.SkipBcVersionCheck 149 } 150 if dec.DatabaseHandles != nil { 151 c.DatabaseHandles = *dec.DatabaseHandles 152 } 153 if dec.DatabaseCache != nil { 154 c.DatabaseCache = *dec.DatabaseCache 155 } 156 if dec.TrieCleanCache != nil { 157 c.TrieCleanCache = *dec.TrieCleanCache 158 } 159 if dec.TrieDirtyCache != nil { 160 c.TrieDirtyCache = *dec.TrieDirtyCache 161 } 162 if dec.TrieTimeout != nil { 163 c.TrieTimeout = *dec.TrieTimeout 164 } 165 if dec.Etherbase != nil { 166 c.Etherbase = *dec.Etherbase 167 } 168 if dec.MinerNotify != nil { 169 c.MinerNotify = dec.MinerNotify 170 } 171 if dec.MinerExtraData != nil { 172 c.MinerExtraData = *dec.MinerExtraData 173 } 174 if dec.MinerGasFloor != nil { 175 c.MinerGasFloor = *dec.MinerGasFloor 176 } 177 if dec.MinerGasCeil != nil { 178 c.MinerGasCeil = *dec.MinerGasCeil 179 } 180 if dec.MinerGasPrice != nil { 181 c.MinerGasPrice = dec.MinerGasPrice 182 } 183 if dec.MinerRecommit != nil { 184 c.MinerRecommit = *dec.MinerRecommit 185 } 186 if dec.MinerNoverify != nil { 187 c.MinerNoverify = *dec.MinerNoverify 188 } 189 if dec.Ethash != nil { 190 c.Ethash = *dec.Ethash 191 } 192 if dec.TxPool != nil { 193 c.TxPool = *dec.TxPool 194 } 195 if dec.GPO != nil { 196 c.GPO = *dec.GPO 197 } 198 if dec.EnablePreimageRecording != nil { 199 c.EnablePreimageRecording = *dec.EnablePreimageRecording 200 } 201 if dec.DocRoot != nil { 202 c.DocRoot = *dec.DocRoot 203 } 204 if dec.EWASMInterpreter != nil { 205 c.EWASMInterpreter = *dec.EWASMInterpreter 206 } 207 if dec.EVMInterpreter != nil { 208 c.EVMInterpreter = *dec.EVMInterpreter 209 } 210 return nil 211 }