Skip to content

Commit

Permalink
cmd: remove all log.Fatal calls in main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Jan 9, 2025
1 parent 10faf17 commit fdca6b2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions cmd/walletd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
"log"
"os"
"os/signal"
"path/filepath"
Expand Down Expand Up @@ -319,9 +318,7 @@ func main() {
}
recoveryPhrase := cwallet.NewSeedPhrase()
var seed [32]byte
if err := cwallet.SeedFromPhrase(&seed, recoveryPhrase); err != nil {
log.Fatal(err)
}
checkFatalError("failed to parse mnemonic phrase", cwallet.SeedFromPhrase(&seed, recoveryPhrase))
addr := types.StandardUnlockHash(cwallet.KeyFromSeed(&seed, 0).PublicKey())

fmt.Println("Recovery Phrase:", recoveryPhrase)
Expand All @@ -340,10 +337,7 @@ func main() {
}

minerAddr, err := types.ParseAddress(minerAddrStr)
if err != nil {
log.Fatal(err)
}

checkFatalError("failed to parse miner address", err)
mustSetAPIPassword()
c := api.NewClient("http://"+cfg.HTTP.Address+"/api", cfg.HTTP.Password)
runCPUMiner(c, minerAddr, minerBlocks)
Expand Down

0 comments on commit fdca6b2

Please sign in to comment.