Browse Source

Merge pull request #1872 from tendermint/1829-fill-in-missing-fields

overwrite pubkey and address for convenience
pull/1899/head
Alexander Simmerl 6 years ago
committed by GitHub
parent
commit
4c373a6e78
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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