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