Pass bank to rpc as reference

This commit is contained in:
Tyera Eulberg 2018-08-22 16:44:26 -06:00 committed by Tyera Eulberg
parent d910ed68a3
commit 2de8fe9c5f
3 changed files with 4 additions and 4 deletions

0
doc/json-rpc.md Normal file
View File

View File

@ -207,7 +207,7 @@ impl Fullnode {
drone_addr.set_port(DRONE_PORT);
let rpc_addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), RPC_PORT);
let rpc_service = JsonRpcService::new(
bank.clone(),
&bank,
node.data.contact_info.tpu,
drone_addr,
rpc_addr,
@ -310,7 +310,7 @@ impl Fullnode {
drone_addr.set_port(DRONE_PORT);
let rpc_addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), RPC_PORT);
let rpc_service = JsonRpcService::new(
bank.clone(),
&bank,
node.data.contact_info.tpu,
drone_addr,
rpc_addr,

View File

@ -25,13 +25,13 @@ pub struct JsonRpcService {
impl JsonRpcService {
pub fn new(
bank: Arc<Bank>,
bank: &Arc<Bank>,
transactions_addr: SocketAddr,
drone_addr: SocketAddr,
rpc_addr: SocketAddr,
exit: Arc<AtomicBool>,
) -> Self {
let request_processor = JsonRpcRequestProcessor::new(bank);
let request_processor = JsonRpcRequestProcessor::new(bank.clone());
let thread_hdl = Builder::new()
.name("solana-jsonrpc".to_string())
.spawn(move || {