Commit 058ba1f4 authored by kenshin-samourai's avatar kenshin-samourai
Browse files

removed unused variables and fields

parent 56004a39
......@@ -14,8 +14,7 @@ impl App {
pub fn new(
store: store::DBStore,
index: index::Index,
daemon: daemon::Daemon,
config: &Config,
daemon: daemon::Daemon
) -> Result<Arc<App>> {
Ok(Arc::new(App {
store,
......
......@@ -53,7 +53,7 @@ fn run_server(config: &Config) -> Result<()> {
}
.enable_compaction(); // enable auto compactions before starting incremental index updates.
let app = App::new(store, index, daemon, &config)?;
let app = App::new(store, index, daemon)?;
let tx_cache = TransactionCache::new(config.tx_cache_size);
let query = Query::new(app.clone(), tx_cache, config.txid_limit);
......
......@@ -345,7 +345,7 @@ impl Daemon {
self.network.magic()
}
fn call_jsonrpc(&self, method: &str, request: &Value) -> Result<Value> {
fn call_jsonrpc(&self, request: &Value) -> Result<Value> {
let mut conn = self.conn.lock().unwrap();
let request = request.to_string();
conn.send(&request)?;
......@@ -361,7 +361,7 @@ impl Daemon {
.map(|params| json!({"method": method, "params": params, "id": id}))
.collect();
let mut results = vec![];
let mut replies = self.call_jsonrpc(method, &reqs)?;
let mut replies = self.call_jsonrpc(&reqs)?;
if let Some(replies_vec) = replies.as_array_mut() {
for reply in replies_vec {
results.push(parse_jsonrpc_reply(reply.take(), method, id)?)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment