Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-kosu: print pubkey correctly #246

Merged
merged 4 commits into from Aug 29, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

go-kosu: print pubkey correctly

  • Loading branch information
gchaincl committed Aug 29, 2019
commit bb1a5d5dbc8e1fdc14504fa07f449c7a2515cded
@@ -1,13 +1,14 @@
package abci

import (
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"os"

"github.com/tendermint/tendermint/cmd/tendermint/commands"
"github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/crypto/ed25519"
tmflags "github.com/tendermint/tendermint/libs/cli/flags"
log "github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/node"
@@ -73,15 +74,16 @@ func ShowNodeInfo(cfg *config.Config) (*NodeInfo, error) {
return nil, err
}

priv := privval.LoadFilePV(
priv := privval.LoadFilePVEmptyState(
cfg.PrivValidatorKeyFile(),
cfg.PrivValidatorStateFile(),
).Key

key := priv.PubKey.(ed25519.PubKeyEd25519)
return &NodeInfo{
PeerID: string(nodeKey.ID()),
NodeID: priv.Address.String(),
PublicKey: hex.EncodeToString(priv.PubKey.Bytes()),
PublicKey: fmt.Sprintf("%X", key[:]),
Moniker: cfg.Moniker,
}, nil
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.