Skip to content

Commit

Permalink
fix: consider bech prefixes when using flags, fixed description
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno committed May 9, 2021
1 parent 8e84dd1 commit 258bd98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ After that, you need to download the latest release from [the releases page](htt

```sh
wget <the link from the releases page>
tar xvfz missed-blocks-checker-*.*-amd64.tar.gz
cd missed-blocks-checker-*.*-amd64.tar.gz
tar xvfz missed-blocks-checker_*
./missed-blocks-checker --telegram-token <bot token> --telegram-chat <user or chat ID from the previous step>
```

Expand Down Expand Up @@ -65,7 +64,7 @@ sudo systemctl status missed-blocks-checker # validate it's running
If you need to, you can also see the logs of the process:

```sh
sudo journalctl -u missed-blocks-checker -f
sudo journalctl -u missed-blocks-checker -f --output cat
```

## How does it work?
Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ var rootCmd = &cobra.Command{
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
if ConfigPath == "" {
log.Trace().Msg("No config file provided, skipping")
setBechPrefixes(cmd)
return nil
}

Expand Down Expand Up @@ -474,6 +475,8 @@ func main() {
rootCmd.PersistentFlags().StringVar(&ConsensusNodePrefix, "bech-consensus-node-prefix", "", "Bech32 consensus node prefix")
rootCmd.PersistentFlags().StringVar(&ConsensusNodePubkeyPrefix, "bech-consensus-node-pubkey-prefix", "", "Bech32 pubkey consensus node prefix")

zerolog.SetGlobalLevel(zerolog.InfoLevel)

if err := rootCmd.MarkPersistentFlagRequired("telegram-token"); err != nil {
log.Fatal().Err(err).Msg("Could not mark flag as required")
}
Expand Down

0 comments on commit 258bd98

Please sign in to comment.