Skip to content

Commit

Permalink
(BIDS-2335) use config for bt setup on eth1indexer, signatures (#2439)
Browse files Browse the repository at this point in the history
  • Loading branch information
MauserBitfly authored Aug 8, 2023
1 parent 9a9985f commit 9c7cfdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions cmd/eth1indexer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ func main() {
tokenPriceExportList := flag.String("token.price.list", "", "Tokenlist path to use for the token price export")
tokenPriceExportFrequency := flag.Duration("token.price.frequency", time.Hour, "Token price export interval")

bigtableProject := flag.String("bigtable.project", "", "Bigtable project")
bigtableInstance := flag.String("bigtable.instance", "", "Bigtable instance")

versionFlag := flag.Bool("version", false, "Print version and exit")

configPath := flag.String("config", "", "Path to the config file, if empty string defaults will be used")
Expand Down Expand Up @@ -137,7 +134,7 @@ func main() {
logrus.Fatalf("node chain id mismatch, wanted %v got %v", chainId, nodeChainId.String())
}

bt, err := db.InitBigtable(*bigtableProject, *bigtableInstance, chainId, utils.Config.RedisCacheEndpoint)
bt, err := db.InitBigtable(utils.Config.Bigtable.Project, utils.Config.Bigtable.Instance, chainId, utils.Config.RedisCacheEndpoint)
if err != nil {
logrus.Fatalf("error connecting to bigtable: %v", err)
}
Expand Down
4 changes: 1 addition & 3 deletions cmd/signatures/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import (
* so that we can label the transction function calls instead of the "id"
**/
func main() {
bigtableProject := flag.String("bigtable.project", "", "Bigtable project")
bigtableInstance := flag.String("bigtable.instance", "", "Bigtable instance")
configPath := flag.String("config", "", "Path to the config file, if empty string defaults will be used")
metricsAddr := flag.String("metrics.address", "localhost:9090", "serve metrics on that addr")
metricsEnabled := flag.Bool("metrics.enabled", false, "enable serving metrics")
Expand Down Expand Up @@ -76,7 +74,7 @@ func main() {
}()
}

bt, err := db.InitBigtable(*bigtableProject, *bigtableInstance, "1", utils.Config.RedisCacheEndpoint)
bt, err := db.InitBigtable(utils.Config.Bigtable.Project, utils.Config.Bigtable.Instance, "1", utils.Config.RedisCacheEndpoint)
if err != nil {
logrus.Errorf("error initializing bigtable: %v", err)
return
Expand Down

0 comments on commit 9c7cfdd

Please sign in to comment.