github.com/juliankolbe/go-ethereum@v1.9.992/eth/ethconfig/gen_config.go (about) 1 // Code generated by github.com/fjl/gencodec. DO NOT EDIT. 2 3 package ethconfig 4 5 import ( 6 "time" 7 8 "github.com/juliankolbe/go-ethereum/common" 9 "github.com/juliankolbe/go-ethereum/consensus/ethash" 10 "github.com/juliankolbe/go-ethereum/core" 11 "github.com/juliankolbe/go-ethereum/eth/downloader" 12 "github.com/juliankolbe/go-ethereum/eth/gasprice" 13 "github.com/juliankolbe/go-ethereum/miner" 14 "github.com/juliankolbe/go-ethereum/params" 15 ) 16 17 // MarshalTOML marshals as TOML. 18 func (c Config) MarshalTOML() (interface{}, error) { 19 type Config struct { 20 Genesis *core.Genesis `toml:",omitempty"` 21 NetworkId uint64 22 SyncMode downloader.SyncMode 23 EthDiscoveryURLs []string 24 SnapDiscoveryURLs []string 25 NoPruning bool 26 NoPrefetch bool 27 TxLookupLimit uint64 `toml:",omitempty"` 28 Whitelist map[uint64]common.Hash `toml:"-"` 29 LightServ int `toml:",omitempty"` 30 LightIngress int `toml:",omitempty"` 31 LightEgress int `toml:",omitempty"` 32 LightPeers int `toml:",omitempty"` 33 LightNoPrune bool `toml:",omitempty"` 34 LightNoSyncServe bool `toml:",omitempty"` 35 SyncFromCheckpoint bool `toml:",omitempty"` 36 UltraLightServers []string `toml:",omitempty"` 37 UltraLightFraction int `toml:",omitempty"` 38 UltraLightOnlyAnnounce bool `toml:",omitempty"` 39 SkipBcVersionCheck bool `toml:"-"` 40 DatabaseHandles int `toml:"-"` 41 DatabaseCache int 42 DatabaseFreezer string 43 TrieCleanCache int 44 TrieCleanCacheJournal string `toml:",omitempty"` 45 TrieCleanCacheRejournal time.Duration `toml:",omitempty"` 46 TrieDirtyCache int 47 TrieTimeout time.Duration 48 SnapshotCache int 49 Preimages bool 50 Miner miner.Config 51 Ethash ethash.Config 52 TxPool core.TxPoolConfig 53 GPO gasprice.Config 54 EnablePreimageRecording bool 55 DocRoot string `toml:"-"` 56 EWASMInterpreter string 57 EVMInterpreter string 58 RPCGasCap uint64 `toml:",omitempty"` 59 RPCTxFeeCap float64 `toml:",omitempty"` 60 Checkpoint *params.TrustedCheckpoint `toml:",omitempty"` 61 CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"` 62 } 63 var enc Config 64 enc.Genesis = c.Genesis 65 enc.NetworkId = c.NetworkId 66 enc.SyncMode = c.SyncMode 67 enc.EthDiscoveryURLs = c.EthDiscoveryURLs 68 enc.SnapDiscoveryURLs = c.SnapDiscoveryURLs 69 enc.NoPruning = c.NoPruning 70 enc.NoPrefetch = c.NoPrefetch 71 enc.TxLookupLimit = c.TxLookupLimit 72 enc.Whitelist = c.Whitelist 73 enc.LightServ = c.LightServ 74 enc.LightIngress = c.LightIngress 75 enc.LightEgress = c.LightEgress 76 enc.LightPeers = c.LightPeers 77 enc.LightNoPrune = c.LightNoPrune 78 enc.LightNoSyncServe = c.LightNoSyncServe 79 enc.SyncFromCheckpoint = c.SyncFromCheckpoint 80 enc.UltraLightServers = c.UltraLightServers 81 enc.UltraLightFraction = c.UltraLightFraction 82 enc.UltraLightOnlyAnnounce = c.UltraLightOnlyAnnounce 83 enc.SkipBcVersionCheck = c.SkipBcVersionCheck 84 enc.DatabaseHandles = c.DatabaseHandles 85 enc.DatabaseCache = c.DatabaseCache 86 enc.DatabaseFreezer = c.DatabaseFreezer 87 enc.TrieCleanCache = c.TrieCleanCache 88 enc.TrieCleanCacheJournal = c.TrieCleanCacheJournal 89 enc.TrieCleanCacheRejournal = c.TrieCleanCacheRejournal 90 enc.TrieDirtyCache = c.TrieDirtyCache 91 enc.TrieTimeout = c.TrieTimeout 92 enc.SnapshotCache = c.SnapshotCache 93 enc.Preimages = c.Preimages 94 enc.Miner = c.Miner 95 enc.Ethash = c.Ethash 96 enc.TxPool = c.TxPool 97 enc.GPO = c.GPO 98 enc.EnablePreimageRecording = c.EnablePreimageRecording 99 enc.DocRoot = c.DocRoot 100 enc.EWASMInterpreter = c.EWASMInterpreter 101 enc.EVMInterpreter = c.EVMInterpreter 102 enc.RPCGasCap = c.RPCGasCap 103 enc.RPCTxFeeCap = c.RPCTxFeeCap 104 enc.Checkpoint = c.Checkpoint 105 enc.CheckpointOracle = c.CheckpointOracle 106 return &enc, nil 107 } 108 109 // UnmarshalTOML unmarshals from TOML. 110 func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { 111 type Config struct { 112 Genesis *core.Genesis `toml:",omitempty"` 113 NetworkId *uint64 114 SyncMode *downloader.SyncMode 115 EthDiscoveryURLs []string 116 SnapDiscoveryURLs []string 117 NoPruning *bool 118 NoPrefetch *bool 119 TxLookupLimit *uint64 `toml:",omitempty"` 120 Whitelist map[uint64]common.Hash `toml:"-"` 121 LightServ *int `toml:",omitempty"` 122 LightIngress *int `toml:",omitempty"` 123 LightEgress *int `toml:",omitempty"` 124 LightPeers *int `toml:",omitempty"` 125 LightNoPrune *bool `toml:",omitempty"` 126 LightNoSyncServe *bool `toml:",omitempty"` 127 SyncFromCheckpoint *bool `toml:",omitempty"` 128 UltraLightServers []string `toml:",omitempty"` 129 UltraLightFraction *int `toml:",omitempty"` 130 UltraLightOnlyAnnounce *bool `toml:",omitempty"` 131 SkipBcVersionCheck *bool `toml:"-"` 132 DatabaseHandles *int `toml:"-"` 133 DatabaseCache *int 134 DatabaseFreezer *string 135 TrieCleanCache *int 136 TrieCleanCacheJournal *string `toml:",omitempty"` 137 TrieCleanCacheRejournal *time.Duration `toml:",omitempty"` 138 TrieDirtyCache *int 139 TrieTimeout *time.Duration 140 SnapshotCache *int 141 Preimages *bool 142 Miner *miner.Config 143 Ethash *ethash.Config 144 TxPool *core.TxPoolConfig 145 GPO *gasprice.Config 146 EnablePreimageRecording *bool 147 DocRoot *string `toml:"-"` 148 EWASMInterpreter *string 149 EVMInterpreter *string 150 RPCGasCap *uint64 `toml:",omitempty"` 151 RPCTxFeeCap *float64 `toml:",omitempty"` 152 Checkpoint *params.TrustedCheckpoint `toml:",omitempty"` 153 CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"` 154 } 155 var dec Config 156 if err := unmarshal(&dec); err != nil { 157 return err 158 } 159 if dec.Genesis != nil { 160 c.Genesis = dec.Genesis 161 } 162 if dec.NetworkId != nil { 163 c.NetworkId = *dec.NetworkId 164 } 165 if dec.SyncMode != nil { 166 c.SyncMode = *dec.SyncMode 167 } 168 if dec.EthDiscoveryURLs != nil { 169 c.EthDiscoveryURLs = dec.EthDiscoveryURLs 170 } 171 if dec.SnapDiscoveryURLs != nil { 172 c.SnapDiscoveryURLs = dec.SnapDiscoveryURLs 173 } 174 if dec.NoPruning != nil { 175 c.NoPruning = *dec.NoPruning 176 } 177 if dec.NoPrefetch != nil { 178 c.NoPrefetch = *dec.NoPrefetch 179 } 180 if dec.TxLookupLimit != nil { 181 c.TxLookupLimit = *dec.TxLookupLimit 182 } 183 if dec.Whitelist != nil { 184 c.Whitelist = dec.Whitelist 185 } 186 if dec.LightServ != nil { 187 c.LightServ = *dec.LightServ 188 } 189 if dec.LightIngress != nil { 190 c.LightIngress = *dec.LightIngress 191 } 192 if dec.LightEgress != nil { 193 c.LightEgress = *dec.LightEgress 194 } 195 if dec.LightPeers != nil { 196 c.LightPeers = *dec.LightPeers 197 } 198 if dec.LightNoPrune != nil { 199 c.LightNoPrune = *dec.LightNoPrune 200 } 201 if dec.LightNoSyncServe != nil { 202 c.LightNoSyncServe = *dec.LightNoSyncServe 203 } 204 if dec.SyncFromCheckpoint != nil { 205 c.SyncFromCheckpoint = *dec.SyncFromCheckpoint 206 } 207 if dec.UltraLightServers != nil { 208 c.UltraLightServers = dec.UltraLightServers 209 } 210 if dec.UltraLightFraction != nil { 211 c.UltraLightFraction = *dec.UltraLightFraction 212 } 213 if dec.UltraLightOnlyAnnounce != nil { 214 c.UltraLightOnlyAnnounce = *dec.UltraLightOnlyAnnounce 215 } 216 if dec.SkipBcVersionCheck != nil { 217 c.SkipBcVersionCheck = *dec.SkipBcVersionCheck 218 } 219 if dec.DatabaseHandles != nil { 220 c.DatabaseHandles = *dec.DatabaseHandles 221 } 222 if dec.DatabaseCache != nil { 223 c.DatabaseCache = *dec.DatabaseCache 224 } 225 if dec.DatabaseFreezer != nil { 226 c.DatabaseFreezer = *dec.DatabaseFreezer 227 } 228 if dec.TrieCleanCache != nil { 229 c.TrieCleanCache = *dec.TrieCleanCache 230 } 231 if dec.TrieCleanCacheJournal != nil { 232 c.TrieCleanCacheJournal = *dec.TrieCleanCacheJournal 233 } 234 if dec.TrieCleanCacheRejournal != nil { 235 c.TrieCleanCacheRejournal = *dec.TrieCleanCacheRejournal 236 } 237 if dec.TrieDirtyCache != nil { 238 c.TrieDirtyCache = *dec.TrieDirtyCache 239 } 240 if dec.TrieTimeout != nil { 241 c.TrieTimeout = *dec.TrieTimeout 242 } 243 if dec.SnapshotCache != nil { 244 c.SnapshotCache = *dec.SnapshotCache 245 } 246 if dec.Preimages != nil { 247 c.Preimages = *dec.Preimages 248 } 249 if dec.Miner != nil { 250 c.Miner = *dec.Miner 251 } 252 if dec.Ethash != nil { 253 c.Ethash = *dec.Ethash 254 } 255 if dec.TxPool != nil { 256 c.TxPool = *dec.TxPool 257 } 258 if dec.GPO != nil { 259 c.GPO = *dec.GPO 260 } 261 if dec.EnablePreimageRecording != nil { 262 c.EnablePreimageRecording = *dec.EnablePreimageRecording 263 } 264 if dec.DocRoot != nil { 265 c.DocRoot = *dec.DocRoot 266 } 267 if dec.EWASMInterpreter != nil { 268 c.EWASMInterpreter = *dec.EWASMInterpreter 269 } 270 if dec.EVMInterpreter != nil { 271 c.EVMInterpreter = *dec.EVMInterpreter 272 } 273 if dec.RPCGasCap != nil { 274 c.RPCGasCap = *dec.RPCGasCap 275 } 276 if dec.RPCTxFeeCap != nil { 277 c.RPCTxFeeCap = *dec.RPCTxFeeCap 278 } 279 if dec.Checkpoint != nil { 280 c.Checkpoint = dec.Checkpoint 281 } 282 if dec.CheckpointOracle != nil { 283 c.CheckpointOracle = dec.CheckpointOracle 284 } 285 return nil 286 }