github.com/nitinawathare/ethereumassignment3@v0.0.0-20211021213010-f07344c2b868/go-ethereum/eth/gen_config.go (about) 1 // Code generated by github.com/fjl/gencodec. DO NOT EDIT. 2 3 package eth 4 5 import ( 6 "math/big" 7 "time" 8 9 "github.com/ethereum/go-ethereum/common" 10 "github.com/ethereum/go-ethereum/common/hexutil" 11 "github.com/ethereum/go-ethereum/consensus/ethash" 12 "github.com/ethereum/go-ethereum/core" 13 "github.com/ethereum/go-ethereum/eth/downloader" 14 "github.com/ethereum/go-ethereum/eth/gasprice" 15 ) 16 17 var _ = (*configMarshaling)(nil) 18 19 // MarshalTOML marshals as TOML. 20 func (c Config) MarshalTOML() (interface{}, error) { 21 type Config struct { 22 Genesis *core.Genesis `toml:",omitempty"` 23 InterArrival float64 24 HashPower float64 25 Behavior uint64 26 NetworkId uint64 27 SyncMode downloader.SyncMode 28 NoPruning bool 29 LightServ int `toml:",omitempty"` 30 LightBandwidthIn int `toml:",omitempty"` 31 LightBandwidthOut int `toml:",omitempty"` 32 LightPeers int `toml:",omitempty"` 33 OnlyAnnounce bool 34 ULC *ULCConfig `toml:",omitempty"` 35 SkipBcVersionCheck bool `toml:"-"` 36 DatabaseHandles int `toml:"-"` 37 DatabaseCache int 38 TrieCleanCache int 39 TrieDirtyCache int 40 TrieTimeout time.Duration 41 Etherbase common.Address `toml:",omitempty"` 42 MinerNotify []string `toml:",omitempty"` 43 MinerExtraData hexutil.Bytes `toml:",omitempty"` 44 MinerGasFloor uint64 45 MinerGasCeil uint64 46 MinerGasPrice *big.Int 47 MinerRecommit time.Duration 48 MinerNoverify bool 49 Ethash ethash.Config 50 TxPool core.TxPoolConfig 51 GPO gasprice.Config 52 EnablePreimageRecording bool 53 DocRoot string `toml:"-"` 54 EWASMInterpreter string 55 EVMInterpreter string 56 } 57 var enc Config 58 enc.Genesis = c.Genesis 59 enc.InterArrival = c.InterArrival 60 enc.HashPower = c.HashPower 61 enc.Behavior = c.Behavior 62 enc.NetworkId = c.NetworkId 63 enc.SyncMode = c.SyncMode 64 enc.NoPruning = c.NoPruning 65 enc.LightServ = c.LightServ 66 enc.LightBandwidthIn = c.LightBandwidthIn 67 enc.LightBandwidthOut = c.LightBandwidthOut 68 enc.LightPeers = c.LightPeers 69 enc.OnlyAnnounce = c.OnlyAnnounce 70 enc.ULC = c.ULC 71 enc.SkipBcVersionCheck = c.SkipBcVersionCheck 72 enc.DatabaseHandles = c.DatabaseHandles 73 enc.DatabaseCache = c.DatabaseCache 74 enc.TrieCleanCache = c.TrieCleanCache 75 enc.TrieDirtyCache = c.TrieDirtyCache 76 enc.TrieTimeout = c.TrieTimeout 77 enc.Etherbase = c.Etherbase 78 enc.MinerNotify = c.MinerNotify 79 enc.MinerExtraData = c.MinerExtraData 80 enc.MinerGasFloor = c.MinerGasFloor 81 enc.MinerGasCeil = c.MinerGasCeil 82 enc.MinerGasPrice = c.MinerGasPrice 83 enc.MinerRecommit = c.MinerRecommit 84 enc.MinerNoverify = c.MinerNoverify 85 enc.Ethash = c.Ethash 86 enc.TxPool = c.TxPool 87 enc.GPO = c.GPO 88 89 enc.EnablePreimageRecording = c.EnablePreimageRecording 90 enc.DocRoot = c.DocRoot 91 enc.EWASMInterpreter = c.EWASMInterpreter 92 enc.EVMInterpreter = c.EVMInterpreter 93 return &enc, nil 94 } 95 96 // UnmarshalTOML unmarshals from TOML. 97 func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { 98 type Config struct { 99 Genesis *core.Genesis `toml:",omitempty"` 100 InterArrival *float64 101 HashPower *float64 102 Behavior *uint64 103 NetworkId *uint64 104 SyncMode *downloader.SyncMode 105 NoPruning *bool 106 LightServ *int `toml:",omitempty"` 107 LightBandwidthIn *int `toml:",omitempty"` 108 LightBandwidthOut *int `toml:",omitempty"` 109 LightPeers *int `toml:",omitempty"` 110 OnlyAnnounce *bool 111 ULC *ULCConfig `toml:",omitempty"` 112 SkipBcVersionCheck *bool `toml:"-"` 113 DatabaseHandles *int `toml:"-"` 114 DatabaseCache *int 115 TrieCleanCache *int 116 TrieDirtyCache *int 117 TrieTimeout *time.Duration 118 Etherbase *common.Address `toml:",omitempty"` 119 MinerNotify []string `toml:",omitempty"` 120 MinerExtraData *hexutil.Bytes `toml:",omitempty"` 121 MinerGasFloor *uint64 122 MinerGasCeil *uint64 123 MinerGasPrice *big.Int 124 MinerRecommit *time.Duration 125 MinerNoverify *bool 126 Ethash *ethash.Config 127 TxPool *core.TxPoolConfig 128 GPO *gasprice.Config 129 EnablePreimageRecording *bool 130 DocRoot *string `toml:"-"` 131 EWASMInterpreter *string 132 EVMInterpreter *string 133 } 134 var dec Config 135 if err := unmarshal(&dec); err != nil { 136 return err 137 } 138 if dec.Genesis != nil { 139 c.Genesis = dec.Genesis 140 } 141 if dec.InterArrival != nil { 142 c.InterArrival = *dec.InterArrival 143 } 144 if dec.HashPower != nil { 145 c.HashPower = *dec.HashPower 146 } 147 if dec.Behavior != nil { 148 c.Behavior = *dec.Behavior 149 } 150 if dec.NetworkId != nil { 151 c.NetworkId = *dec.NetworkId 152 } 153 if dec.SyncMode != nil { 154 c.SyncMode = *dec.SyncMode 155 } 156 if dec.NoPruning != nil { 157 c.NoPruning = *dec.NoPruning 158 } 159 if dec.LightServ != nil { 160 c.LightServ = *dec.LightServ 161 } 162 if dec.LightBandwidthIn != nil { 163 c.LightBandwidthIn = *dec.LightBandwidthIn 164 } 165 if dec.LightBandwidthOut != nil { 166 c.LightBandwidthOut = *dec.LightBandwidthOut 167 } 168 if dec.LightPeers != nil { 169 c.LightPeers = *dec.LightPeers 170 } 171 if dec.OnlyAnnounce != nil { 172 c.OnlyAnnounce = *dec.OnlyAnnounce 173 } 174 if dec.ULC != nil { 175 c.ULC = dec.ULC 176 } 177 if dec.SkipBcVersionCheck != nil { 178 c.SkipBcVersionCheck = *dec.SkipBcVersionCheck 179 } 180 if dec.DatabaseHandles != nil { 181 c.DatabaseHandles = *dec.DatabaseHandles 182 } 183 if dec.DatabaseCache != nil { 184 c.DatabaseCache = *dec.DatabaseCache 185 } 186 if dec.TrieCleanCache != nil { 187 c.TrieCleanCache = *dec.TrieCleanCache 188 } 189 if dec.TrieDirtyCache != nil { 190 c.TrieDirtyCache = *dec.TrieDirtyCache 191 } 192 if dec.TrieTimeout != nil { 193 c.TrieTimeout = *dec.TrieTimeout 194 } 195 if dec.Etherbase != nil { 196 c.Etherbase = *dec.Etherbase 197 } 198 if dec.MinerNotify != nil { 199 c.MinerNotify = dec.MinerNotify 200 } 201 if dec.MinerExtraData != nil { 202 c.MinerExtraData = *dec.MinerExtraData 203 } 204 if dec.MinerGasFloor != nil { 205 c.MinerGasFloor = *dec.MinerGasFloor 206 } 207 if dec.MinerGasCeil != nil { 208 c.MinerGasCeil = *dec.MinerGasCeil 209 } 210 if dec.MinerGasPrice != nil { 211 c.MinerGasPrice = dec.MinerGasPrice 212 } 213 if dec.MinerRecommit != nil { 214 c.MinerRecommit = *dec.MinerRecommit 215 } 216 if dec.MinerNoverify != nil { 217 c.MinerNoverify = *dec.MinerNoverify 218 } 219 if dec.Ethash != nil { 220 c.Ethash = *dec.Ethash 221 } 222 if dec.TxPool != nil { 223 c.TxPool = *dec.TxPool 224 } 225 if dec.GPO != nil { 226 c.GPO = *dec.GPO 227 } 228 if dec.EnablePreimageRecording != nil { 229 c.EnablePreimageRecording = *dec.EnablePreimageRecording 230 } 231 if dec.DocRoot != nil { 232 c.DocRoot = *dec.DocRoot 233 } 234 if dec.EWASMInterpreter != nil { 235 c.EWASMInterpreter = *dec.EWASMInterpreter 236 } 237 if dec.EVMInterpreter != nil { 238 c.EVMInterpreter = *dec.EVMInterpreter 239 } 240 return nil 241 }