mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 13:51:21 +00:00
Integrate privVal client with node secret
This commit is contained in:
committed by
Ethan Buchman
parent
38d18ca11a
commit
7d71e702d8
32
node/node.go
32
node/node.go
@ -79,13 +79,13 @@ type NodeProvider func(*cfg.Config, log.Logger) (*Node, error)
|
||||
func DefaultNewNode(config *cfg.Config, logger log.Logger) (*Node, error) {
|
||||
var privVal types.PrivValidator
|
||||
privVal = types.LoadOrGenPrivValidatorFS(config.PrivValidatorFile())
|
||||
/*
|
||||
if config.PrivValidatorAddr != "" {
|
||||
pvsc := priv_val.NewPrivValidatorSocketClient(logger.With("module", "priv_val"),
|
||||
config.PrivValidatorAddr)
|
||||
pvsc.Start()
|
||||
privVal = pvsc
|
||||
}
|
||||
/* TODO
|
||||
if config.PrivValidatorAddr != "" {
|
||||
pvsc := priv_val.NewPrivValidatorSocketClient(logger.With("module", "priv_val"),
|
||||
config.PrivValidatorAddr)
|
||||
pvsc.Start()
|
||||
privVal = pvsc
|
||||
}
|
||||
*/
|
||||
fmt.Println("PRIV", config.PrivValidatorAddr)
|
||||
|
||||
@ -94,7 +94,8 @@ func DefaultNewNode(config *cfg.Config, logger log.Logger) (*Node, error) {
|
||||
proxy.DefaultClientCreator(config.ProxyApp, config.ABCI, config.DBDir()),
|
||||
DefaultGenesisDocProviderFunc(config),
|
||||
DefaultDBProvider,
|
||||
logger)
|
||||
logger,
|
||||
)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -183,6 +184,21 @@ func NewNode(config *cfg.Config,
|
||||
// reload the state (it may have been updated by the handshake)
|
||||
state = sm.LoadState(stateDB)
|
||||
|
||||
/* TODO
|
||||
// Generate node PrivKey
|
||||
privKey := crypto.GenPrivKeyEd25519()
|
||||
|
||||
if config.PrivValidatorAddr != "" {
|
||||
pvsc := priv_val.NewPrivValidatorSocketClient(
|
||||
logger.With("module", "priv_val"),
|
||||
config.PrivValidatorAddr,
|
||||
&privKey,
|
||||
)
|
||||
pvsc.Start()
|
||||
privValidator = pvsc
|
||||
}
|
||||
*/
|
||||
|
||||
// Decide whether to fast-sync or not
|
||||
// We don't fast-sync when the only validator is us.
|
||||
fastSync := config.FastSync
|
||||
|
Reference in New Issue
Block a user