mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 04:01:55 +00:00
Add ability to construct new instance of Tendermint core from scratch
This commit is contained in:
committed by
Ethan Buchman
parent
7dd3c007c7
commit
4e13a19339
@@ -128,12 +128,16 @@ func GenPrivValidator() *PrivValidator {
|
||||
}
|
||||
}
|
||||
|
||||
func LoadPrivValidatorWithSigner(signer Signer) *PrivValidator {
|
||||
// LoadPrivValidatorWithSigner instantiates a private validator with a custom
|
||||
// signer object. Tendermint tracks state in the PrivValidator that might be
|
||||
// saved to disk. Please supply a filepath where Tendermint can save the
|
||||
// private validator.
|
||||
func LoadPrivValidatorWithSigner(signer Signer, filePath string) *PrivValidator {
|
||||
return &PrivValidator{
|
||||
Address: signer.PubKey().Address(),
|
||||
PubKey: signer.PubKey(),
|
||||
LastStep: stepNone,
|
||||
filePath: "",
|
||||
filePath: filePath,
|
||||
Signer: signer,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user