Skip to content

Commit

Permalink
fix logs
Browse files Browse the repository at this point in the history
  • Loading branch information
muhamadazmy committed Oct 17, 2022
1 parent b552f4f commit 6dea4ba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmds/modules/noded/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,10 @@ func action(cli *cli.Context) error {
}()

log.Info().Uint32("twin", twin).Msg("node has been registered")
log.Debug().Msg("start message bus")
identityd := stubs.NewIdentityManagerStub(redis)
sk := ed25519.PrivateKey(identityd.PrivateKey(ctx))
idStub := stubs.NewIdentityManagerStub(redis)
fetchCtx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
sk := ed25519.PrivateKey(idStub.PrivateKey(fetchCtx))
id, err := substrate.NewIdentityFromEd25519Key(sk)
log.Info().Str("address", id.Address()).Msg("node address")
if err != nil {
Expand Down Expand Up @@ -280,6 +281,7 @@ func action(cli *cli.Context) error {
}
}()

log.Debug().Msg("start message bus")
return runMsgBus(ctx, sub, id)
}

Expand Down

0 comments on commit 6dea4ba

Please sign in to comment.