Remove useless ref counts
This commit is contained in:
@ -11,12 +11,12 @@ use result::Result;
|
|||||||
use signature::PublicKey;
|
use signature::PublicKey;
|
||||||
use std::net::{SocketAddr, UdpSocket};
|
use std::net::{SocketAddr, UdpSocket};
|
||||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::Mutex;
|
||||||
use transaction::Transaction;
|
use transaction::Transaction;
|
||||||
|
|
||||||
pub struct AccountingStage {
|
pub struct AccountingStage {
|
||||||
pub output: Arc<Mutex<Receiver<Entry>>>,
|
pub output: Mutex<Receiver<Entry>>,
|
||||||
entry_sender: Arc<Mutex<Sender<Entry>>>,
|
entry_sender: Mutex<Sender<Entry>>,
|
||||||
pub acc: Accountant,
|
pub acc: Accountant,
|
||||||
historian_input: Mutex<Sender<Signal>>,
|
historian_input: Mutex<Sender<Signal>>,
|
||||||
historian: Mutex<Historian>,
|
historian: Mutex<Historian>,
|
||||||
@ -30,8 +30,8 @@ impl AccountingStage {
|
|||||||
let historian = Historian::new(event_receiver, start_hash, ms_per_tick);
|
let historian = Historian::new(event_receiver, start_hash, ms_per_tick);
|
||||||
let (entry_sender, output) = channel();
|
let (entry_sender, output) = channel();
|
||||||
AccountingStage {
|
AccountingStage {
|
||||||
output: Arc::new(Mutex::new(output)),
|
output: Mutex::new(output),
|
||||||
entry_sender: Arc::new(Mutex::new(entry_sender)),
|
entry_sender: Mutex::new(entry_sender),
|
||||||
acc,
|
acc,
|
||||||
entry_info_subscribers: Mutex::new(vec![]),
|
entry_info_subscribers: Mutex::new(vec![]),
|
||||||
historian_input: Mutex::new(historian_input),
|
historian_input: Mutex::new(historian_input),
|
||||||
|
@ -5,12 +5,12 @@ use entry::Entry;
|
|||||||
use hash::Hash;
|
use hash::Hash;
|
||||||
use recorder::{ExitReason, Recorder, Signal};
|
use recorder::{ExitReason, Recorder, Signal};
|
||||||
use std::sync::mpsc::{channel, Receiver, Sender, TryRecvError};
|
use std::sync::mpsc::{channel, Receiver, Sender, TryRecvError};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::Mutex;
|
||||||
use std::thread::{spawn, JoinHandle};
|
use std::thread::{spawn, JoinHandle};
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
|
|
||||||
pub struct Historian {
|
pub struct Historian {
|
||||||
pub output: Arc<Mutex<Receiver<Entry>>>,
|
pub output: Mutex<Receiver<Entry>>,
|
||||||
pub thread_hdl: JoinHandle<ExitReason>,
|
pub thread_hdl: JoinHandle<ExitReason>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,9 +23,8 @@ impl Historian {
|
|||||||
let (entry_sender, output) = channel();
|
let (entry_sender, output) = channel();
|
||||||
let thread_hdl =
|
let thread_hdl =
|
||||||
Historian::create_recorder(*start_hash, ms_per_tick, event_receiver, entry_sender);
|
Historian::create_recorder(*start_hash, ms_per_tick, event_receiver, entry_sender);
|
||||||
let loutput = Arc::new(Mutex::new(output));
|
|
||||||
Historian {
|
Historian {
|
||||||
output: loutput,
|
output: Mutex::new(output),
|
||||||
thread_hdl,
|
thread_hdl,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user