mirror of https://github.com/zcash/mpc.git
Clean up constants.
This commit is contained in:
parent
82b4aaa915
commit
46c9a5e436
|
@ -0,0 +1 @@
|
||||||
|
pub const NETWORK_MAGIC: [u8; 8] = [0xee, 0xee, 0x1f, 0xcc, 0x1c, 0xee, 0xcc, 0x19];
|
|
@ -15,9 +15,12 @@ extern crate time;
|
||||||
extern crate ansi_term;
|
extern crate ansi_term;
|
||||||
|
|
||||||
mod protocol;
|
mod protocol;
|
||||||
|
use self::protocol::*;
|
||||||
|
|
||||||
|
mod consts;
|
||||||
|
use self::consts::*;
|
||||||
|
|
||||||
use snark::*;
|
use snark::*;
|
||||||
use self::protocol::*;
|
|
||||||
use std::net::{TcpListener, TcpStream};
|
use std::net::{TcpListener, TcpStream};
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
@ -31,9 +34,8 @@ use bincode::rustc_serialize::{encode_into, decode_from};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
const USE_DUMMY_CS: bool = true;
|
const USE_DUMMY_CS: bool = true;
|
||||||
const LISTEN_ADDR: &'static str = "127.0.0.1:65530";
|
const LISTEN_ADDR: &'static str = "0.0.0.0:65530";
|
||||||
const NETWORK_MAGIC: [u8; 8] = [0xff, 0xff, 0x1f, 0xbb, 0x1c, 0xee, 0x00, 0x19];
|
const PLAYERS: usize = 3;
|
||||||
const PLAYERS: usize = 2;
|
|
||||||
pub const THREADS: usize = 8;
|
pub const THREADS: usize = 8;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
@ -11,6 +11,8 @@ extern crate bincode;
|
||||||
|
|
||||||
mod protocol;
|
mod protocol;
|
||||||
use self::protocol::*;
|
use self::protocol::*;
|
||||||
|
mod consts;
|
||||||
|
use self::consts::*;
|
||||||
|
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use std::net::{TcpStream};
|
use std::net::{TcpStream};
|
||||||
|
@ -22,7 +24,6 @@ use bincode::SizeLimit::Infinite;
|
||||||
use bincode::rustc_serialize::{encode_into, decode_from};
|
use bincode::rustc_serialize::{encode_into, decode_from};
|
||||||
|
|
||||||
const COORDINATOR_ADDR: &'static str = "127.0.0.1:65530";
|
const COORDINATOR_ADDR: &'static str = "127.0.0.1:65530";
|
||||||
const NETWORK_MAGIC: [u8; 8] = [0xff, 0xff, 0x1f, 0xbb, 0x1c, 0xee, 0x00, 0x19];
|
|
||||||
pub const THREADS: usize = 8;
|
pub const THREADS: usize = 8;
|
||||||
|
|
||||||
struct ConnectionHandler {
|
struct ConnectionHandler {
|
||||||
|
|
Loading…
Reference in New Issue