Browse Source

Clean up flags

pull/1204/head
Alexander Simmerl 7 years ago
parent
commit
a1020307a0
1 changed files with 11 additions and 5 deletions
  1. +11
    -5
      cmd/priv_val_server/main.go

+ 11
- 5
cmd/priv_val_server/main.go View File

@ -13,23 +13,29 @@ import (
func main() { func main() {
var ( var (
chainID = flag.String("chain-id", "mychain", "chain id") chainID = flag.String("chain-id", "mychain", "chain id")
numClients = flag.Int("clients", 1, "number of concurrently connected clients")
listenAddr = flag.String("laddr", ":46659", "Validator listen address (0.0.0.0:0 means any interface, any port")
maxClients = flag.Int("clients", 3, "number of concurrently connected clients")
privValPath = flag.String("priv", "", "priv val file path") privValPath = flag.String("priv", "", "priv val file path")
socketAddr = flag.String("socket.addr", ":46659", "socket bind addr")
logger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "priv_val") logger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "priv_val")
) )
flag.Parse() flag.Parse()
logger.Info("Reading args privValidatorSocketServer", "chainID", *chainID, "privPath", *privValPath)
logger.Info(
"Starting private validator",
"chainID", *chainID,
"listenAddr", *listenAddr,
"maxClients", *maxClients,
"privPath", *privValPath,
)
privVal := priv_val.LoadPrivValidatorJSON(*privValPath) privVal := priv_val.LoadPrivValidatorJSON(*privValPath)
pvss := priv_val.NewPrivValidatorSocketServer( pvss := priv_val.NewPrivValidatorSocketServer(
logger, logger,
*chainID, *chainID,
*socketAddr,
*numClients,
*listenAddr,
*maxClients,
privVal, privVal,
nil, nil,
) )


Loading…
Cancel
Save