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