diff --git a/src/rpu.rs b/src/rpu.rs index fa85f6b97..0f7d31674 100644 --- a/src/rpu.rs +++ b/src/rpu.rs @@ -28,15 +28,6 @@ pub struct Rpu { impl Rpu { /// Create a new Rpu that wraps the given Bank. - pub fn new(bank: Bank, start_hash: Hash, tick_duration: Option) -> Self { - Rpu { - bank: Arc::new(bank), - start_hash, - tick_duration, - thread_hdls: vec![], - } - } - pub fn new1( bank: Bank, start_hash: Hash, @@ -49,7 +40,12 @@ impl Rpu { exit: Arc, writer: W, ) -> Self { - let mut rpu = Self::new(bank, start_hash, tick_duration); + let mut rpu = Rpu { + bank: Arc::new(bank), + start_hash, + tick_duration, + thread_hdls: vec![], + }; let thread_hdls = rpu.serve( me, requests_socket, diff --git a/src/tpu.rs b/src/tpu.rs index 39f6da055..4908aeb7e 100644 --- a/src/tpu.rs +++ b/src/tpu.rs @@ -27,15 +27,6 @@ pub struct Tpu { impl Tpu { /// Create a new Tpu that wraps the given Bank. - pub fn new(bank: Bank, start_hash: Hash, tick_duration: Option) -> Self { - Tpu { - bank: Arc::new(bank), - start_hash, - tick_duration, - thread_hdls: vec![], - } - } - pub fn new1( bank: Bank, start_hash: Hash, @@ -47,7 +38,12 @@ impl Tpu { exit: Arc, writer: W, ) -> Self { - let mut tpu = Tpu::new(bank, start_hash, tick_duration); + let mut tpu = Tpu { + bank: Arc::new(bank), + start_hash, + tick_duration, + thread_hdls: vec![], + }; let thread_hdls = tpu.serve(me, requests_socket, broadcast_socket, gossip, exit, writer); tpu.thread_hdls.extend(thread_hdls); tpu