Skip to content

Commit

Permalink
add tier1 network name configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Mar 27, 2024
1 parent 4fd5e4c commit 6271fa9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/apps/substreams_tier1.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func RegisterSubstreamsTier1App[B firecore.Block](chain *firecore.Chain[B], root
cmd.Flags().Bool("substreams-tier1-subrequests-insecure", false, "Connect to tier2 without checking certificate validity")
cmd.Flags().Bool("substreams-tier1-subrequests-plaintext", true, "Connect to tier2 without client in plaintext mode")
cmd.Flags().Int("substreams-tier1-max-subrequests", 4, "number of parallel subrequests that the tier1 can make to the tier2 per request")
cmd.Flags().String("substreams-tier1-network-name", "undefined", "Network name to use for the substreams tier1 server. Used for metrics and logging. Default is 'undefined'")

// all substreams
registerCommonSubstreamsFlags(cmd)
Expand Down Expand Up @@ -102,8 +103,12 @@ func RegisterSubstreamsTier1App[B firecore.Block](chain *firecore.Chain[B], root
return nil, fmt.Errorf("substreams extensions: %w", err)
}

networkName := viper.GetString("substreams-tier1-network-name")

return app.NewTier1(appLogger,
&app.Tier1Config{
NetworkName: networkName,

MergedBlocksStoreURL: mergedBlocksStoreURL,
OneBlocksStoreURL: oneBlocksStoreURL,
ForkedBlocksStoreURL: forkedBlocksStoreURL,
Expand Down

0 comments on commit 6271fa9

Please sign in to comment.