Add parameter for API modules (#997)

This commit is contained in:
Frank Mueller 2018-05-28 18:37:09 +02:00 committed by GitHub
parent 098053f605
commit c41ae530c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,7 @@ var (
httpEnabled = flag.Bool("http", false, "Enable HTTP RPC endpoint")
httpHost = flag.String("httphost", "127.0.0.1", "HTTP RPC host of the listening socket")
httpPort = flag.Int("httpport", params.HTTPPort, "HTTP RPC server's listening port")
httpModules = flag.String("httpmodules", params.APIModules, "Comma separated list of HTTP RPC APIs")
ipcEnabled = flag.Bool("ipc", false, "Enable IPC RPC endpoint")
ipcFile = flag.String("ipcfile", "", "Set IPC file path")
cliEnabled = flag.Bool("cli", false, "Enable debugging CLI server")
@ -217,6 +218,7 @@ func makeNodeConfig() (*params.NodeConfig, error) {
nodeConfig.HTTPHost = *httpHost
nodeConfig.HTTPPort = *httpPort
nodeConfig.APIModules = *httpModules
nodeConfig.IPCEnabled = *ipcEnabled
if *ipcFile != "" {

View File

@ -25,7 +25,7 @@ const (
// HTTPHost is host interface for the HTTP RPC server
HTTPHost = "localhost"
// HTTPPort is HTTP-RPC port (replaced in unit tests)
// HTTPPort is HTTP RPC port (replaced in unit tests)
HTTPPort = 8545
// ListenAddr is an IP address and port of this node (e.g. 127.0.0.1:30303).