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