Skip to content

Commit f334f15

Browse files
committed
x
1 parent 18853a0 commit f334f15

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

config/config.go

-34
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,6 @@ var (
149149
Dispatcher: Dispatcher{
150150
EventChanSize: 10000,
151151
},
152-
Explorer: Explorer{
153-
Enabled: false,
154-
UseIndexer: false,
155-
Port: 14004,
156-
TpsWindow: 10,
157-
GasStation: GasStation{
158-
SuggestBlockWindow: 20,
159-
DefaultGas: 1,
160-
Percentile: 60,
161-
},
162-
MaxTransferPayloadBytes: 1024,
163-
},
164152
API: API{
165153
UseRDS: false,
166154
Port: 14014,
@@ -204,7 +192,6 @@ var (
204192
Validates = []Validate{
205193
ValidateRollDPoS,
206194
ValidateDispatcher,
207-
ValidateExplorer,
208195
ValidateAPI,
209196
ValidateActPool,
210197
}
@@ -282,18 +269,6 @@ type (
282269
EventChanSize uint `yaml:"eventChanSize"`
283270
}
284271

285-
// Explorer is the explorer service config
286-
Explorer struct {
287-
Enabled bool `yaml:"enabled"`
288-
IsTest bool `yaml:"isTest"`
289-
UseIndexer bool `yaml:"useIndexer"`
290-
Port int `yaml:"port"`
291-
TpsWindow int `yaml:"tpsWindow"`
292-
GasStation GasStation `yaml:"gasStation"`
293-
// MaxTransferPayloadBytes limits how many bytes a playload can contain at most
294-
MaxTransferPayloadBytes uint64 `yaml:"maxTransferPayloadBytes"`
295-
}
296-
297272
// API is the api service config
298273
API struct {
299274
UseRDS bool `yaml:"useRDS"`
@@ -395,7 +370,6 @@ type (
395370
Consensus Consensus `yaml:"consensus"`
396371
BlockSync BlockSync `yaml:"blockSync"`
397372
Dispatcher Dispatcher `yaml:"dispatcher"`
398-
Explorer Explorer `yaml:"explorer"`
399373
API API `yaml:"api"`
400374
Indexer Indexer `yaml:"indexer"`
401375
System System `yaml:"system"`
@@ -548,14 +522,6 @@ func ValidateRollDPoS(cfg Config) error {
548522
return nil
549523
}
550524

551-
// ValidateExplorer validates the explorer configs
552-
func ValidateExplorer(cfg Config) error {
553-
if cfg.Explorer.Enabled && cfg.Explorer.TpsWindow <= 0 {
554-
return errors.Wrap(ErrInvalidCfg, "tps window is not a positive integer when the explorer is enabled")
555-
}
556-
return nil
557-
}
558-
559525
// ValidateAPI validates the api configs
560526
func ValidateAPI(cfg Config) error {
561527
if cfg.API.TpsWindow <= 0 {

0 commit comments

Comments
 (0)