Skip to content

Commit

Permalink
cmd: rpc url env added to ingest cmd (#48)
Browse files Browse the repository at this point in the history
What
Adds a new RPC_URL environment variable to the ingest command.

Why
It was previously not being read from the envs.
  • Loading branch information
daniel-burghardt authored Oct 1, 2024
1 parent e9cdaa2 commit 35437b3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func (c *ingestCmd) Command() *cobra.Command {
utils.NetworkPassphraseOption(&cfg.NetworkPassphrase),
utils.SentryDSNOption(&sentryDSN),
utils.StellarEnvironmentOption(&stellarEnvironment),
utils.RPCClientURLOption(&cfg.RPCURL),
{
Name: "captive-core-bin-path",
Usage: "Path to Captive Core's binary file.",
Expand Down
10 changes: 10 additions & 0 deletions cmd/utils/global_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ func HorizonClientURLOption(configKey *string) *config.ConfigOption {
}
}

func RPCClientURLOption(configKey *string) *config.ConfigOption {
return &config.ConfigOption{
Name: "rpc-url",
Usage: "The URL of the Stellar RPC server which this application will communicate with.",
OptType: types.String,
ConfigKey: configKey,
Required: true,
}
}

func ChannelAccountEncryptionPassphraseOption(configKey *string) *config.ConfigOption {
return &config.ConfigOption{
Name: "channel-account-encryption-passphrase",
Expand Down

0 comments on commit 35437b3

Please sign in to comment.