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