From af3eee6a6758bda06428a7d2b78e9eaab1ff412a Mon Sep 17 00:00:00 2001 From: Bryan White Date: Tue, 11 Jul 2023 09:28:32 +0200 Subject: [PATCH] chore: consistent debug CLI identity --- app/client/cli/helpers/setup.go | 6 +++++- runtime/manager.go | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/client/cli/helpers/setup.go b/app/client/cli/helpers/setup.go index 350bcbf238..6f5a8af2c1 100644 --- a/app/client/cli/helpers/setup.go +++ b/app/client/cli/helpers/setup.go @@ -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 { @@ -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() diff --git a/runtime/manager.go b/runtime/manager.go index 151f2c198b..7c182f34f9 100644 --- a/runtime/manager.go +++ b/runtime/manager.go @@ -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 {