binary for blockstatus, blockchaininfo

This commit is contained in:
Nikolay Volf
2016-05-06 17:16:03 +04:00
parent 96a4eb5b9e
commit 29531ae72f
7 changed files with 18 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ lazy_static = "0.1"
ethcore-devtools = { path = "../devtools" }
ethjson = { path = "../json" }
bloomchain = "0.1"
"ethcore-ipc" = { path = "../ipc/rpc" }
[features]
jit = ["evmjit"]

View File

@@ -85,6 +85,7 @@ extern crate num_cpus;
extern crate crossbeam;
extern crate ethjson;
extern crate bloomchain;
extern crate ethcore_ipc as ipc;
#[cfg(test)] extern crate ethcore_devtools as devtools;
#[cfg(feature = "jit" )] extern crate evmjit;

View File

@@ -16,8 +16,11 @@
//! Block status description module
use ipc::binary::BinaryConvertError;
use std::collections::VecDeque;
/// General block status
#[derive(Debug, Eq, PartialEq)]
#[derive(Debug, Eq, PartialEq, Binary)]
pub enum BlockStatus {
/// Part of the blockchain.
InChain,

View File

@@ -14,11 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use util::*;
use util::numbers::*;
use header::BlockNumber;
use ipc::binary::BinaryConvertError;
use std::mem;
use std::collections::VecDeque;
/// Information about the blockchain gathered together.
#[derive(Debug)]
#[derive(Debug, Binary)]
pub struct BlockChainInfo {
/// Blockchain difficulty.
pub total_difficulty: U256,