mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 04:41:22 +00:00
[config] RPCConfig
This commit is contained in:
@ -255,7 +255,7 @@ func (n *Node) OnStart() error {
|
||||
}
|
||||
|
||||
// Run the RPC server
|
||||
if n.config.RPCListenAddress != "" {
|
||||
if n.config.RPC.ListenAddress != "" {
|
||||
listeners, err := n.startRPC()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -320,7 +320,7 @@ func (n *Node) ConfigureRPC() {
|
||||
|
||||
func (n *Node) startRPC() ([]net.Listener, error) {
|
||||
n.ConfigureRPC()
|
||||
listenAddrs := strings.Split(n.config.RPCListenAddress, ",")
|
||||
listenAddrs := strings.Split(n.config.RPC.ListenAddress, ",")
|
||||
|
||||
// we may expose the rpc over both a unix and tcp socket
|
||||
listeners := make([]net.Listener, len(listenAddrs))
|
||||
@ -339,7 +339,7 @@ func (n *Node) startRPC() ([]net.Listener, error) {
|
||||
}
|
||||
|
||||
// we expose a simplified api over grpc for convenience to app devs
|
||||
grpcListenAddr := n.config.GRPCListenAddress
|
||||
grpcListenAddr := n.config.RPC.GRPCListenAddress
|
||||
if grpcListenAddr != "" {
|
||||
listener, err := grpccore.StartGRPCServer(grpcListenAddr)
|
||||
if err != nil {
|
||||
@ -421,7 +421,7 @@ func (n *Node) makeNodeInfo() *p2p.NodeInfo {
|
||||
p2pListener := n.sw.Listeners()[0]
|
||||
p2pHost := p2pListener.ExternalAddress().IP.String()
|
||||
p2pPort := p2pListener.ExternalAddress().Port
|
||||
rpcListenAddr := n.config.RPCListenAddress
|
||||
rpcListenAddr := n.config.RPC.ListenAddress
|
||||
|
||||
// We assume that the rpcListener has the same ExternalAddress.
|
||||
// This is probably true because both P2P and RPC listeners use UPnP,
|
||||
|
Reference in New Issue
Block a user