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