From 26a7d757cbc47eb93c48d7da21518e50541a51e3 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 3 Jul 2018 16:31:34 +0400 Subject: [PATCH] overwrite pubkey and address for convenience Closes #1829 --- privval/priv_validator.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/privval/priv_validator.go b/privval/priv_validator.go index 2abcf5590..1e85bf7b3 100644 --- a/privval/priv_validator.go +++ b/privval/priv_validator.go @@ -9,8 +9,8 @@ import ( "time" "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/types" cmn "github.com/tendermint/tendermint/libs/common" + "github.com/tendermint/tendermint/types" ) // TODO: type ? @@ -91,6 +91,10 @@ func LoadFilePV(filePath string) *FilePV { cmn.Exit(cmn.Fmt("Error reading PrivValidator from %v: %v\n", filePath, err)) } + // overwrite pubkey and address for convenience + pv.PubKey = pv.PrivKey.PubKey() + pv.Address = pv.PubKey.Address() + pv.filePath = filePath return pv }