Browse Source

overwrite pubkey and address for convenience

Closes #1829
pull/1872/head
Anton Kaliaev 6 years ago
parent
commit
26a7d757cb
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      privval/priv_validator.go

+ 5
- 1
privval/priv_validator.go View File

@ -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
}


Loading…
Cancel
Save