github.com/hyperion-hyn/go-ethereum@v2.4.0+incompatible/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/consensus/istanbul" 13 "github.com/ethereum/go-ethereum/core" 14 "github.com/ethereum/go-ethereum/eth/downloader" 15 "github.com/ethereum/go-ethereum/eth/gasprice" 16 ) 17 18 var _ = (*configMarshaling)(nil) 19 20 // MarshalTOML marshals as TOML. 21 func (c Config) MarshalTOML() (interface{}, error) { 22 type Config struct { 23 Genesis *core.Genesis `toml:",omitempty"` 24 NetworkId uint64 25 SyncMode downloader.SyncMode 26 NoPruning bool 27 LightServ int `toml:",omitempty"` 28 LightPeers int `toml:",omitempty"` 29 SkipBcVersionCheck bool `toml:"-"` 30 DatabaseHandles int `toml:"-"` 31 DatabaseCache int 32 TrieCache int 33 TrieTimeout time.Duration 34 Etherbase common.Address `toml:",omitempty"` 35 MinerNotify []string `toml:",omitempty"` 36 MinerExtraData hexutil.Bytes `toml:",omitempty"` 37 MinerGasFloor uint64 38 MinerGasCeil uint64 39 MinerGasPrice *big.Int 40 MinerRecommit time.Duration 41 MinerNoverify bool 42 Ethash ethash.Config 43 TxPool core.TxPoolConfig 44 GPO gasprice.Config 45 EnablePreimageRecording bool 46 Istanbul istanbul.Config 47 DocRoot string `toml:"-"` 48 } 49 var enc Config 50 enc.Genesis = c.Genesis 51 enc.NetworkId = c.NetworkId 52 enc.SyncMode = c.SyncMode 53 enc.NoPruning = c.NoPruning 54 enc.LightServ = c.LightServ 55 enc.LightPeers = c.LightPeers 56 enc.SkipBcVersionCheck = c.SkipBcVersionCheck 57 enc.DatabaseHandles = c.DatabaseHandles 58 enc.DatabaseCache = c.DatabaseCache 59 enc.TrieCache = c.TrieCache 60 enc.TrieTimeout = c.TrieTimeout 61 enc.Etherbase = c.Etherbase 62 enc.MinerNotify = c.MinerNotify 63 enc.MinerExtraData = c.MinerExtraData 64 enc.MinerGasFloor = c.MinerGasFloor 65 enc.MinerGasCeil = c.MinerGasCeil 66 enc.MinerGasPrice = c.MinerGasPrice 67 enc.MinerRecommit = c.MinerRecommit 68 enc.MinerNoverify = c.MinerNoverify 69 enc.Ethash = c.Ethash 70 enc.TxPool = c.TxPool 71 enc.GPO = c.GPO 72 enc.EnablePreimageRecording = c.EnablePreimageRecording 73 enc.Istanbul = c.Istanbul 74 enc.DocRoot = c.DocRoot 75 return &enc, nil 76 } 77 78 // UnmarshalTOML unmarshals from TOML. 79 func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { 80 type Config struct { 81 Genesis *core.Genesis `toml:",omitempty"` 82 NetworkId *uint64 83 SyncMode *downloader.SyncMode 84 NoPruning *bool 85 LightServ *int `toml:",omitempty"` 86 LightPeers *int `toml:",omitempty"` 87 SkipBcVersionCheck *bool `toml:"-"` 88 DatabaseHandles *int `toml:"-"` 89 DatabaseCache *int 90 TrieCache *int 91 TrieTimeout *time.Duration 92 Etherbase *common.Address `toml:",omitempty"` 93 MinerNotify []string `toml:",omitempty"` 94 MinerExtraData *hexutil.Bytes `toml:",omitempty"` 95 MinerGasFloor *uint64 96 MinerGasCeil *uint64 97 MinerGasPrice *big.Int 98 MinerRecommit *time.Duration 99 MinerNoverify *bool 100 Ethash *ethash.Config 101 TxPool *core.TxPoolConfig 102 GPO *gasprice.Config 103 EnablePreimageRecording *bool 104 Istanbul *istanbul.Config 105 DocRoot *string `toml:"-"` 106 } 107 var dec Config 108 if err := unmarshal(&dec); err != nil { 109 return err 110 } 111 if dec.Genesis != nil { 112 c.Genesis = dec.Genesis 113 } 114 if dec.NetworkId != nil { 115 c.NetworkId = *dec.NetworkId 116 } 117 if dec.SyncMode != nil { 118 c.SyncMode = *dec.SyncMode 119 } 120 if dec.NoPruning != nil { 121 c.NoPruning = *dec.NoPruning 122 } 123 if dec.LightServ != nil { 124 c.LightServ = *dec.LightServ 125 } 126 if dec.LightPeers != nil { 127 c.LightPeers = *dec.LightPeers 128 } 129 if dec.SkipBcVersionCheck != nil { 130 c.SkipBcVersionCheck = *dec.SkipBcVersionCheck 131 } 132 if dec.DatabaseHandles != nil { 133 c.DatabaseHandles = *dec.DatabaseHandles 134 } 135 if dec.DatabaseCache != nil { 136 c.DatabaseCache = *dec.DatabaseCache 137 } 138 if dec.TrieCache != nil { 139 c.TrieCache = *dec.TrieCache 140 } 141 if dec.TrieTimeout != nil { 142 c.TrieTimeout = *dec.TrieTimeout 143 } 144 if dec.Etherbase != nil { 145 c.Etherbase = *dec.Etherbase 146 } 147 if dec.MinerNotify != nil { 148 c.MinerNotify = dec.MinerNotify 149 } 150 if dec.MinerExtraData != nil { 151 c.MinerExtraData = *dec.MinerExtraData 152 } 153 if dec.MinerGasFloor != nil { 154 c.MinerGasFloor = *dec.MinerGasFloor 155 } 156 if dec.MinerGasCeil != nil { 157 c.MinerGasCeil = *dec.MinerGasCeil 158 } 159 if dec.MinerGasPrice != nil { 160 c.MinerGasPrice = dec.MinerGasPrice 161 } 162 if dec.MinerRecommit != nil { 163 c.MinerRecommit = *dec.MinerRecommit 164 } 165 if dec.MinerNoverify != nil { 166 c.MinerNoverify = *dec.MinerNoverify 167 } 168 if dec.Ethash != nil { 169 c.Ethash = *dec.Ethash 170 } 171 if dec.TxPool != nil { 172 c.TxPool = *dec.TxPool 173 } 174 if dec.GPO != nil { 175 c.GPO = *dec.GPO 176 } 177 if dec.EnablePreimageRecording != nil { 178 c.EnablePreimageRecording = *dec.EnablePreimageRecording 179 } 180 if dec.Istanbul != nil { 181 c.Istanbul = *dec.Istanbul 182 } 183 if dec.DocRoot != nil { 184 c.DocRoot = *dec.DocRoot 185 } 186 return nil 187 }