Add parameter for API modules (#997)
This commit is contained in:
parent
098053f605
commit
c41ae530c3
|
@ -42,6 +42,7 @@ var (
|
||||||
httpEnabled = flag.Bool("http", false, "Enable HTTP RPC endpoint")
|
httpEnabled = flag.Bool("http", false, "Enable HTTP RPC endpoint")
|
||||||
httpHost = flag.String("httphost", "127.0.0.1", "HTTP RPC host of the listening socket")
|
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")
|
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")
|
ipcEnabled = flag.Bool("ipc", false, "Enable IPC RPC endpoint")
|
||||||
ipcFile = flag.String("ipcfile", "", "Set IPC file path")
|
ipcFile = flag.String("ipcfile", "", "Set IPC file path")
|
||||||
cliEnabled = flag.Bool("cli", false, "Enable debugging CLI server")
|
cliEnabled = flag.Bool("cli", false, "Enable debugging CLI server")
|
||||||
|
@ -217,6 +218,7 @@ func makeNodeConfig() (*params.NodeConfig, error) {
|
||||||
|
|
||||||
nodeConfig.HTTPHost = *httpHost
|
nodeConfig.HTTPHost = *httpHost
|
||||||
nodeConfig.HTTPPort = *httpPort
|
nodeConfig.HTTPPort = *httpPort
|
||||||
|
nodeConfig.APIModules = *httpModules
|
||||||
nodeConfig.IPCEnabled = *ipcEnabled
|
nodeConfig.IPCEnabled = *ipcEnabled
|
||||||
|
|
||||||
if *ipcFile != "" {
|
if *ipcFile != "" {
|
||||||
|
|
|
@ -25,7 +25,7 @@ const (
|
||||||
// HTTPHost is host interface for the HTTP RPC server
|
// HTTPHost is host interface for the HTTP RPC server
|
||||||
HTTPHost = "localhost"
|
HTTPHost = "localhost"
|
||||||
|
|
||||||
// HTTPPort is HTTP-RPC port (replaced in unit tests)
|
// HTTPPort is HTTP RPC port (replaced in unit tests)
|
||||||
HTTPPort = 8545
|
HTTPPort = 8545
|
||||||
|
|
||||||
// ListenAddr is an IP address and port of this node (e.g. 127.0.0.1:30303).
|
// ListenAddr is an IP address and port of this node (e.g. 127.0.0.1:30303).
|
||||||
|
|
Loading…
Reference in New Issue