1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#![allow(unused)]

extern crate actix;
extern crate actix_web;
extern crate futures;
extern crate quick_protobuf;
extern crate smallvec;
extern crate tokio_io;
#[macro_use]
extern crate log;

#[macro_use]
extern crate error_chain;

extern crate serde;
extern crate serde_json;
#[macro_use]
extern crate serde_derive;

#[macro_use]
extern crate lazy_static;

extern crate byteorder;
extern crate gu_actix;
extern crate rand;

use futures::{future, stream};
use tokio_io::{AsyncRead, AsyncWrite, IoStream};

const PROTO_RPC: &[u8] = &[0x8Cu8, 0xC3, 0x34, 0xBE];

pub type NodeId = types::NodeId;

type Key = [u8; 20];

mod proto;
pub mod rpc;
pub mod types;