Skip to content

Commit

Permalink
chore: print used seed index
Browse files Browse the repository at this point in the history
also, print version as the very first thing
  • Loading branch information
lidel authored and hacdias committed Apr 22, 2024
1 parent 216cd9f commit 99eeeaf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ share the same seed as long as the indexes are different.
}

app.Action = func(cctx *cli.Context) error {
fmt.Printf("Starting %s %s\n", name, version)

ddir := cctx.String("datadir")
cdns := newCachedDNS(dnsCacheRefreshInterval)
defer cdns.Close()
Expand Down Expand Up @@ -288,7 +290,7 @@ share the same seed as long as the indexes are different.

index := cctx.Int("seed-index")
if len(seed) > 0 && index >= 0 {
fmt.Println("Deriving identity from seed")
fmt.Printf("Deriving identity from seed[%d]\n", index)
priv, err = deriveKey(seed, deriveKeyInfo(index))
} else {
fmt.Println("Setting identity from libp2p.key")
Expand Down Expand Up @@ -358,7 +360,6 @@ share the same seed as long as the indexes are different.
Handler: handler,
}

fmt.Printf("Starting %s %s\n", name, version)
pid, err := peer.IDFromPublicKey(priv.GetPublic())
if err != nil {
return err
Expand Down

0 comments on commit 99eeeaf

Please sign in to comment.