Bind RPC port on all interfaces

This commit is contained in:
Michael Vines
2018-08-20 12:12:54 -07:00
parent c9e6fb36c3
commit 9eeaf2d502

View File

@ -11,7 +11,7 @@ use rpc::{JsonRpcService, RPC_PORT};
use rpu::Rpu; use rpu::Rpu;
use service::Service; use service::Service;
use signature::{Keypair, KeypairUtil}; use signature::{Keypair, KeypairUtil};
use std::net::SocketAddr; use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, RwLock}; use std::sync::{Arc, RwLock};
use std::thread::{JoinHandle, Result}; use std::thread::{JoinHandle, Result};
@ -202,8 +202,7 @@ impl Fullnode {
); );
thread_hdls.extend(rpu.thread_hdls()); thread_hdls.extend(rpu.thread_hdls());
let mut rpc_addr = node.data.contact_info.ncp; let rpc_addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), RPC_PORT);
rpc_addr.set_port(RPC_PORT);
let rpc_service = JsonRpcService::new(bank.clone(), rpc_addr, exit.clone()); let rpc_service = JsonRpcService::new(bank.clone(), rpc_addr, exit.clone());
thread_hdls.extend(rpc_service.thread_hdls()); thread_hdls.extend(rpc_service.thread_hdls());