mirror of https://github.com/zcash/mpc.git
Various improvements to constants.
This commit is contained in:
parent
d2187331a6
commit
189a9ea70d
|
@ -23,7 +23,7 @@ use bincode::SizeLimit::Infinite;
|
|||
use bincode::rustc_serialize::{encode_into, decode_from};
|
||||
|
||||
pub const THREADS: usize = 8;
|
||||
pub const DIRECTORY_PREFIX: &'static str = "/home/sean/mpc_trialrun/compute/";
|
||||
pub const DIRECTORY_PREFIX: &'static str = "/";
|
||||
|
||||
fn main() {
|
||||
prompt("Press [ENTER] when you're ready to perform diagnostics of the DVD drive.");
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
pub const NETWORK_MAGIC: [u8; 8] = [0xee, 0xee, 0x1f, 0xcc, 0x1c, 0xee, 0xcc, 0x19];
|
||||
pub const USE_DUMMY_CS: bool = true;
|
||||
pub const USE_DUMMY_CS: bool = false;
|
||||
|
|
|
@ -35,8 +35,8 @@ use bincode::rustc_serialize::{encode_into, decode_from};
|
|||
use std::time::Duration;
|
||||
|
||||
const LISTEN_ADDR: &'static str = "0.0.0.0:65530";
|
||||
const PLAYERS: usize = 3;
|
||||
pub const THREADS: usize = 8;
|
||||
const PLAYERS: usize = 1;
|
||||
pub const THREADS: usize = 128;
|
||||
|
||||
#[derive(Clone)]
|
||||
struct ConnectionHandler {
|
||||
|
|
14
src/dvd.rs
14
src/dvd.rs
|
@ -132,15 +132,17 @@ pub fn read_from_dvd(dvd_path: &str, local_path: &str) -> DvdStatus {
|
|||
pub fn disable_modloop_unmount() {
|
||||
Command::new("/etc/init.d/modloop")
|
||||
.arg("stop")
|
||||
.output();
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
thread::sleep(Duration::from_secs(10));
|
||||
thread::sleep(Duration::from_secs(6));
|
||||
|
||||
Command::new("/usr/bin/umount")
|
||||
Command::new("/bin/umount")
|
||||
.arg("/media/cdrom")
|
||||
.output();
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
thread::sleep(Duration::from_secs(10));
|
||||
thread::sleep(Duration::from_secs(6));
|
||||
}
|
||||
|
||||
pub fn eject() {
|
||||
|
@ -269,8 +271,6 @@ pub fn exchange_disc<
|
|||
},
|
||||
DvdStatus::Error => {
|
||||
eject();
|
||||
prompt(&format!("The disc you inserted may be corrupted. Burn it again \
|
||||
on the other machine.\n\n{}", message));
|
||||
},
|
||||
DvdStatus::Blank => {
|
||||
println!("Burning...");
|
||||
|
|
|
@ -14,7 +14,7 @@ mod dvd;
|
|||
use self::dvd::*;
|
||||
|
||||
use rand::Rng;
|
||||
use std::io::Read;
|
||||
use std::io::{Read, Write};
|
||||
use std::net::{TcpStream};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
@ -24,7 +24,7 @@ use rustc_serialize::{Decodable, Encodable};
|
|||
|
||||
pub const THREADS: usize = 8;
|
||||
pub const DIRECTORY_PREFIX: &'static str = "/home/sean/mpc_trialrun/network/";
|
||||
const COORDINATOR_ADDR: &'static str = "127.0.0.1:65530";
|
||||
const COORDINATOR_ADDR: &'static str = "52.41.255.202:65530";
|
||||
|
||||
struct ConnectionHandler {
|
||||
peerid: [u8; 8],
|
||||
|
@ -103,10 +103,10 @@ impl ConnectionHandler {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
prompt("Press [ENTER] when you're ready to perform diagnostics of the DVD drive.");
|
||||
disable_modloop_unmount();
|
||||
perform_diagnostics();
|
||||
prompt("Diagnostics complete. Press [ENTER] when you're ready to begin the ceremony.");
|
||||
//prompt("Press [ENTER] when you're ready to perform diagnostics of the DVD drive.");
|
||||
//disable_modloop_unmount();
|
||||
//perform_diagnostics();
|
||||
//prompt("Diagnostics complete. Press [ENTER] when you're ready to begin the ceremony.");
|
||||
|
||||
let comm;
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ use snark::*;
|
|||
use bincode::SizeLimit::Infinite;
|
||||
use bincode::rustc_serialize::{encode_into, decode_from};
|
||||
|
||||
pub const THREADS: usize = 8;
|
||||
pub const THREADS: usize = 128;
|
||||
|
||||
fn main() {
|
||||
let mut f = File::open("transcript").unwrap();
|
||||
|
|
Loading…
Reference in New Issue