File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -131,15 +131,19 @@ func Load(configFile string) (*Config, error) {
131
131
return nil , fmt .Errorf ("error processing environment: %s" , err )
132
132
}
133
133
// Provide default script address for named network
134
- if scriptAddress , ok := networkScriptAddresses [globalConfig .Indexer .Network ]; ok {
135
- globalConfig .Indexer .ScriptAddress = scriptAddress
136
- } else {
137
- return nil , fmt .Errorf ("no built-in script address for specified network, please provide one" )
134
+ if globalConfig .Indexer .ScriptAddress == "" {
135
+ if scriptAddress , ok := networkScriptAddresses [globalConfig .Indexer .Network ]; ok {
136
+ globalConfig .Indexer .ScriptAddress = scriptAddress
137
+ } else {
138
+ return nil , fmt .Errorf ("no built-in script address for specified network, please provide one" )
139
+ }
138
140
}
139
141
// Provide default intercept point for named network
140
- if interceptPoint , ok := networkInterceptPoints [globalConfig .Indexer .Network ]; ok {
141
- globalConfig .Indexer .InterceptHash = interceptPoint .Hash
142
- globalConfig .Indexer .InterceptSlot = interceptPoint .Slot
142
+ if globalConfig .Indexer .InterceptSlot == 0 || globalConfig .Indexer .InterceptHash == "" {
143
+ if interceptPoint , ok := networkInterceptPoints [globalConfig .Indexer .Network ]; ok {
144
+ globalConfig .Indexer .InterceptHash = interceptPoint .Hash
145
+ globalConfig .Indexer .InterceptSlot = interceptPoint .Slot
146
+ }
143
147
}
144
148
return globalConfig , nil
145
149
}
You can’t perform that action at this time.
0 commit comments