cmd: add support for --key (#5612)

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
This commit is contained in:
Marko
2020-11-09 15:22:36 +01:00
committed by GitHub
co-authored by Anton Kaliaev
parent 27895a27a4
commit bf35cc6443
21 changed files with 169 additions and 31 deletions
+2 -1
View File
@@ -116,8 +116,9 @@ func TestBroadcastEvidence_DuplicateVoteEvidence(t *testing.T) {
var (
config = rpctest.GetConfig()
chainID = config.ChainID()
pv = privval.LoadOrGenFilePV(config.PrivValidatorKeyFile(), config.PrivValidatorStateFile())
)
pv, err := privval.LoadOrGenFilePV(config.PrivValidatorKeyFile(), config.PrivValidatorStateFile())
require.NoError(t, err)
for i, c := range GetClients() {
correct, fakes := makeEvidences(t, pv, chainID)
+4 -1
View File
@@ -161,7 +161,10 @@ func NewTendermint(app abci.Application, opts *Options) *nm.Node {
}
pvKeyFile := config.PrivValidatorKeyFile()
pvKeyStateFile := config.PrivValidatorStateFile()
pv := privval.LoadOrGenFilePV(pvKeyFile, pvKeyStateFile)
pv, err := privval.LoadOrGenFilePV(pvKeyFile, pvKeyStateFile)
if err != nil {
panic(err)
}
papp := proxy.NewLocalClientCreator(app)
nodeKey, err := p2p.LoadOrGenNodeKey(config.NodeKeyFile())
if err != nil {