block status moved

This commit is contained in:
Nikolay Volf 2016-05-06 00:47:47 +04:00
parent e95f610195
commit 14bcca54d2
5 changed files with 32 additions and 18 deletions

View File

@ -45,19 +45,7 @@ pub use blockchain::CacheSize as BlockChainCacheSize;
use trace::{TraceDB, ImportRequest as TraceImportRequest, LocalizedTrace, Database as TraceDatabase};
use trace;
pub use types::blockchain_info::BlockChainInfo;
/// General block status
#[derive(Debug, Eq, PartialEq)]
pub enum BlockStatus {
/// Part of the blockchain.
InChain,
/// Queued for import.
Queued,
/// Known as bad.
Bad,
/// Unknown.
Unknown,
}
pub use types::block_status::BlockStatus;
impl fmt::Display for BlockChainInfo {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -0,0 +1,30 @@
// Copyright 2015, 2016 Ethcore (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Block status description module
/// General block status
#[derive(Debug, Eq, PartialEq)]
pub enum BlockStatus {
/// Part of the blockchain.
InChain,
/// Queued for import.
Queued,
/// Known as bad.
Bad,
/// Unknown.
Unknown,
}

View File

@ -20,8 +20,6 @@ use util::*;
use trace::Trace;
use types::log_entry::LogEntry;
/// Transaction execution receipt.
#[derive(Debug, PartialEq, Clone)]
pub struct Executed {

View File

@ -60,6 +60,3 @@ pub struct UncleId (
pub usize
);
sized_binary_map!(TransactionId);
sized_binary_map!(UncleId);
sized_binary_map!(BlockId);

View File

@ -24,3 +24,4 @@ pub mod blockchain_info;
pub mod log_entry;
pub mod trace_types;
pub mod executed;
pub mod block_status;