Skip to content

Commit

Permalink
chore: consistent debug CLI identity
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Jul 11, 2023
1 parent 4518327 commit af3eee6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/client/cli/helpers/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import (
"github.com/pokt-network/pocket/shared/modules"
)

// TODO_THIS_COMMIT: add godoc comment explaining what this **is** and **is not**
// intended to be used for.
const debugPrivKey = "09fc8ee114e678e665d09179acb9a30060f680df44ba06b51434ee47940a8613be19b2b886e743eb1ff7880968d6ce1a46350315e569243e747a227ee8faec3d"

// P2PDependenciesPreRunE initializes peerstore & current height providers, and a
// p2p module which consumes them. Everything is registered to the bus.
func P2PDependenciesPreRunE(cmd *cobra.Command, _ []string) error {
Expand All @@ -28,7 +32,7 @@ func P2PDependenciesPreRunE(cmd *cobra.Command, _ []string) error {
runtimeMgr := runtime.NewManagerFromFiles(
flags.ConfigPath, genesisPath,
runtime.WithClientDebugMode(),
runtime.WithRandomPK(),
runtime.WithPK(debugPrivKey),
)

bus := runtimeMgr.GetBus()
Expand Down
1 change: 1 addition & 0 deletions runtime/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func WithRandomPK() func(*Manager) {
return WithPK(privateKey.String())
}

// TECHDEBT(#750): separate conseneus and P2P keys.
func WithPK(pk string) func(*Manager) {
return func(b *Manager) {
if b.config.Consensus == nil {
Expand Down

0 comments on commit af3eee6

Please sign in to comment.