Skip to content

Commit

Permalink
feat: add auth_token in config
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 committed Jan 4, 2024
1 parent 020fc2a commit c6563ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ type NodeConfig struct {
DAAddress string `mapstructure:"da_address"`
Light bool `mapstructure:"light"`
HeaderConfig `mapstructure:",squash"`
LazyAggregator bool `mapstructure:"lazy_aggregator"`
LazyAggregator bool `mapstructure:"lazy_aggregator"`
AuthToken string `mapstructure:"auth_token"`
}

// HeaderConfig allows node to pass the initial trusted header hash to start the header exchange service
Expand Down
2 changes: 1 addition & 1 deletion node/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func initBaseKV(nodeConfig config.NodeConfig, logger log.Logger) (ds.TxnDatastor
func initDALC2(nodeConfig config.NodeConfig, _ ds.TxnDatastore, logger log.Logger) (*da.DAClient, error) {
ctx := context.Background()
// TODO(tnv1): Need get token from config for ignore the hardcode token
client, err := openrpc.NewClient(ctx, nodeConfig.DAAddress, "hardcode here")
client, err := openrpc.NewClient(ctx, nodeConfig.DAAddress, nodeConfig.AuthToken)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c6563ce

Please sign in to comment.