// This file is generated by rust-protobuf 2.0.4. Do not edit
// @generated

// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]

#![cfg_attr(rustfmt, rustfmt_skip)]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]

use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;

#[derive(PartialEq,Clone,Default)]
pub struct Null {
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl Null {
    pub fn new() -> Null {
        ::std::default::Default::default()
    }
}

impl ::protobuf::Message for Null {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Null {
        Null::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let fields = ::std::vec::Vec::new();
                ::protobuf::reflect::MessageDescriptor::new::<Null>(
                    "Null",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static Null {
        static mut instance: ::protobuf::lazy::Lazy<Null> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const Null,
        };
        unsafe {
            instance.get(Null::new)
        }
    }
}

impl ::protobuf::Clear for Null {
    fn clear(&mut self) {
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for Null {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Null {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct Block {
    // message fields
    pub blockchain: ::std::string::String,
    pub hash: ::std::string::String,
    pub previous_hash: ::std::string::String,
    pub timestamp: u64,
    pub height: u64,
    pub merkle_root: ::std::string::String,
    pub markedtx_count: u64,
    pub marked_txs: ::protobuf::RepeatedField<MarkedTransaction>,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl Block {
    pub fn new() -> Block {
        ::std::default::Default::default()
    }

    // string blockchain = 1;

    pub fn clear_blockchain(&mut self) {
        self.blockchain.clear();
    }

    // Param is passed by value, moved
    pub fn set_blockchain(&mut self, v: ::std::string::String) {
        self.blockchain = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_blockchain(&mut self) -> &mut ::std::string::String {
        &mut self.blockchain
    }

    // Take field
    pub fn take_blockchain(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.blockchain, ::std::string::String::new())
    }

    pub fn get_blockchain(&self) -> &str {
        &self.blockchain
    }

    // string hash = 2;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::string::String) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::string::String {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.hash, ::std::string::String::new())
    }

    pub fn get_hash(&self) -> &str {
        &self.hash
    }

    // string previous_hash = 3;

    pub fn clear_previous_hash(&mut self) {
        self.previous_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_previous_hash(&mut self, v: ::std::string::String) {
        self.previous_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_previous_hash(&mut self) -> &mut ::std::string::String {
        &mut self.previous_hash
    }

    // Take field
    pub fn take_previous_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.previous_hash, ::std::string::String::new())
    }

    pub fn get_previous_hash(&self) -> &str {
        &self.previous_hash
    }

    // uint64 timestamp = 4;

    pub fn clear_timestamp(&mut self) {
        self.timestamp = 0;
    }

    // Param is passed by value, moved
    pub fn set_timestamp(&mut self, v: u64) {
        self.timestamp = v;
    }

    pub fn get_timestamp(&self) -> u64 {
        self.timestamp
    }

    // uint64 height = 5;

    pub fn clear_height(&mut self) {
        self.height = 0;
    }

    // Param is passed by value, moved
    pub fn set_height(&mut self, v: u64) {
        self.height = v;
    }

    pub fn get_height(&self) -> u64 {
        self.height
    }

    // string merkle_root = 6;

    pub fn clear_merkle_root(&mut self) {
        self.merkle_root.clear();
    }

    // Param is passed by value, moved
    pub fn set_merkle_root(&mut self, v: ::std::string::String) {
        self.merkle_root = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_merkle_root(&mut self) -> &mut ::std::string::String {
        &mut self.merkle_root
    }

    // Take field
    pub fn take_merkle_root(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.merkle_root, ::std::string::String::new())
    }

    pub fn get_merkle_root(&self) -> &str {
        &self.merkle_root
    }

    // uint64 markedtx_count = 7;

    pub fn clear_markedtx_count(&mut self) {
        self.markedtx_count = 0;
    }

    // Param is passed by value, moved
    pub fn set_markedtx_count(&mut self, v: u64) {
        self.markedtx_count = v;
    }

    pub fn get_markedtx_count(&self) -> u64 {
        self.markedtx_count
    }

    // repeated .bc.MarkedTransaction marked_txs = 8;

    pub fn clear_marked_txs(&mut self) {
        self.marked_txs.clear();
    }

    // Param is passed by value, moved
    pub fn set_marked_txs(&mut self, v: ::protobuf::RepeatedField<MarkedTransaction>) {
        self.marked_txs = v;
    }

    // Mutable pointer to the field.
    pub fn mut_marked_txs(&mut self) -> &mut ::protobuf::RepeatedField<MarkedTransaction> {
        &mut self.marked_txs
    }

    // Take field
    pub fn take_marked_txs(&mut self) -> ::protobuf::RepeatedField<MarkedTransaction> {
        ::std::mem::replace(&mut self.marked_txs, ::protobuf::RepeatedField::new())
    }

    pub fn get_marked_txs(&self) -> &[MarkedTransaction] {
        &self.marked_txs
    }
}

impl ::protobuf::Message for Block {
    fn is_initialized(&self) -> bool {
        for v in &self.marked_txs {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.blockchain)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hash)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.previous_hash)?;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.timestamp = tmp;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.height = tmp;
                },
                6 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.merkle_root)?;
                },
                7 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.markedtx_count = tmp;
                },
                8 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.marked_txs)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.blockchain.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.blockchain);
        }
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.hash);
        }
        if !self.previous_hash.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.previous_hash);
        }
        if self.timestamp != 0 {
            my_size += ::protobuf::rt::value_size(4, self.timestamp, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.height != 0 {
            my_size += ::protobuf::rt::value_size(5, self.height, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.merkle_root.is_empty() {
            my_size += ::protobuf::rt::string_size(6, &self.merkle_root);
        }
        if self.markedtx_count != 0 {
            my_size += ::protobuf::rt::value_size(7, self.markedtx_count, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.marked_txs {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.blockchain.is_empty() {
            os.write_string(1, &self.blockchain)?;
        }
        if !self.hash.is_empty() {
            os.write_string(2, &self.hash)?;
        }
        if !self.previous_hash.is_empty() {
            os.write_string(3, &self.previous_hash)?;
        }
        if self.timestamp != 0 {
            os.write_uint64(4, self.timestamp)?;
        }
        if self.height != 0 {
            os.write_uint64(5, self.height)?;
        }
        if !self.merkle_root.is_empty() {
            os.write_string(6, &self.merkle_root)?;
        }
        if self.markedtx_count != 0 {
            os.write_uint64(7, self.markedtx_count)?;
        }
        for v in &self.marked_txs {
            os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Block {
        Block::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "blockchain",
                    |m: &Block| { &m.blockchain },
                    |m: &mut Block| { &mut m.blockchain },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "hash",
                    |m: &Block| { &m.hash },
                    |m: &mut Block| { &mut m.hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "previous_hash",
                    |m: &Block| { &m.previous_hash },
                    |m: &mut Block| { &mut m.previous_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "timestamp",
                    |m: &Block| { &m.timestamp },
                    |m: &mut Block| { &mut m.timestamp },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "height",
                    |m: &Block| { &m.height },
                    |m: &mut Block| { &mut m.height },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "merkle_root",
                    |m: &Block| { &m.merkle_root },
                    |m: &mut Block| { &mut m.merkle_root },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "markedtx_count",
                    |m: &Block| { &m.markedtx_count },
                    |m: &mut Block| { &mut m.markedtx_count },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<MarkedTransaction>>(
                    "marked_txs",
                    |m: &Block| { &m.marked_txs },
                    |m: &mut Block| { &mut m.marked_txs },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<Block>(
                    "Block",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static Block {
        static mut instance: ::protobuf::lazy::Lazy<Block> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const Block,
        };
        unsafe {
            instance.get(Block::new)
        }
    }
}

impl ::protobuf::Clear for Block {
    fn clear(&mut self) {
        self.clear_blockchain();
        self.clear_hash();
        self.clear_previous_hash();
        self.clear_timestamp();
        self.clear_height();
        self.clear_merkle_root();
        self.clear_markedtx_count();
        self.clear_marked_txs();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for Block {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Block {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct MarkedTransaction {
    // message fields
    pub value: u32,
    pub hash: ::std::string::String,
    pub id: ::std::string::String,
    pub token: ::std::string::String,
    pub addr_from: ::std::string::String,
    pub addr_to: ::std::string::String,
    pub block_height: u64,
    pub index: u64,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl MarkedTransaction {
    pub fn new() -> MarkedTransaction {
        ::std::default::Default::default()
    }

    // uint32 value = 1;

    pub fn clear_value(&mut self) {
        self.value = 0;
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: u32) {
        self.value = v;
    }

    pub fn get_value(&self) -> u32 {
        self.value
    }

    // string hash = 2;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::string::String) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::string::String {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.hash, ::std::string::String::new())
    }

    pub fn get_hash(&self) -> &str {
        &self.hash
    }

    // string id = 3;

    pub fn clear_id(&mut self) {
        self.id.clear();
    }

    // Param is passed by value, moved
    pub fn set_id(&mut self, v: ::std::string::String) {
        self.id = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_id(&mut self) -> &mut ::std::string::String {
        &mut self.id
    }

    // Take field
    pub fn take_id(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.id, ::std::string::String::new())
    }

    pub fn get_id(&self) -> &str {
        &self.id
    }

    // string token = 4;

    pub fn clear_token(&mut self) {
        self.token.clear();
    }

    // Param is passed by value, moved
    pub fn set_token(&mut self, v: ::std::string::String) {
        self.token = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_token(&mut self) -> &mut ::std::string::String {
        &mut self.token
    }

    // Take field
    pub fn take_token(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.token, ::std::string::String::new())
    }

    pub fn get_token(&self) -> &str {
        &self.token
    }

    // string addr_from = 5;

    pub fn clear_addr_from(&mut self) {
        self.addr_from.clear();
    }

    // Param is passed by value, moved
    pub fn set_addr_from(&mut self, v: ::std::string::String) {
        self.addr_from = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_addr_from(&mut self) -> &mut ::std::string::String {
        &mut self.addr_from
    }

    // Take field
    pub fn take_addr_from(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.addr_from, ::std::string::String::new())
    }

    pub fn get_addr_from(&self) -> &str {
        &self.addr_from
    }

    // string addr_to = 6;

    pub fn clear_addr_to(&mut self) {
        self.addr_to.clear();
    }

    // Param is passed by value, moved
    pub fn set_addr_to(&mut self, v: ::std::string::String) {
        self.addr_to = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_addr_to(&mut self) -> &mut ::std::string::String {
        &mut self.addr_to
    }

    // Take field
    pub fn take_addr_to(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.addr_to, ::std::string::String::new())
    }

    pub fn get_addr_to(&self) -> &str {
        &self.addr_to
    }

    // uint64 block_height = 7;

    pub fn clear_block_height(&mut self) {
        self.block_height = 0;
    }

    // Param is passed by value, moved
    pub fn set_block_height(&mut self, v: u64) {
        self.block_height = v;
    }

    pub fn get_block_height(&self) -> u64 {
        self.block_height
    }

    // uint64 index = 8;

    pub fn clear_index(&mut self) {
        self.index = 0;
    }

    // Param is passed by value, moved
    pub fn set_index(&mut self, v: u64) {
        self.index = v;
    }

    pub fn get_index(&self) -> u64 {
        self.index
    }
}

impl ::protobuf::Message for MarkedTransaction {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.value = tmp;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hash)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.token)?;
                },
                5 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.addr_from)?;
                },
                6 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.addr_to)?;
                },
                7 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.block_height = tmp;
                },
                8 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.index = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.value != 0 {
            my_size += ::protobuf::rt::value_size(1, self.value, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.hash);
        }
        if !self.id.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.id);
        }
        if !self.token.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.token);
        }
        if !self.addr_from.is_empty() {
            my_size += ::protobuf::rt::string_size(5, &self.addr_from);
        }
        if !self.addr_to.is_empty() {
            my_size += ::protobuf::rt::string_size(6, &self.addr_to);
        }
        if self.block_height != 0 {
            my_size += ::protobuf::rt::value_size(7, self.block_height, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.index != 0 {
            my_size += ::protobuf::rt::value_size(8, self.index, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.value != 0 {
            os.write_uint32(1, self.value)?;
        }
        if !self.hash.is_empty() {
            os.write_string(2, &self.hash)?;
        }
        if !self.id.is_empty() {
            os.write_string(3, &self.id)?;
        }
        if !self.token.is_empty() {
            os.write_string(4, &self.token)?;
        }
        if !self.addr_from.is_empty() {
            os.write_string(5, &self.addr_from)?;
        }
        if !self.addr_to.is_empty() {
            os.write_string(6, &self.addr_to)?;
        }
        if self.block_height != 0 {
            os.write_uint64(7, self.block_height)?;
        }
        if self.index != 0 {
            os.write_uint64(8, self.index)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> MarkedTransaction {
        MarkedTransaction::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                    "value",
                    |m: &MarkedTransaction| { &m.value },
                    |m: &mut MarkedTransaction| { &mut m.value },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "hash",
                    |m: &MarkedTransaction| { &m.hash },
                    |m: &mut MarkedTransaction| { &mut m.hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "id",
                    |m: &MarkedTransaction| { &m.id },
                    |m: &mut MarkedTransaction| { &mut m.id },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "token",
                    |m: &MarkedTransaction| { &m.token },
                    |m: &mut MarkedTransaction| { &mut m.token },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "addr_from",
                    |m: &MarkedTransaction| { &m.addr_from },
                    |m: &mut MarkedTransaction| { &mut m.addr_from },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "addr_to",
                    |m: &MarkedTransaction| { &m.addr_to },
                    |m: &mut MarkedTransaction| { &mut m.addr_to },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "block_height",
                    |m: &MarkedTransaction| { &m.block_height },
                    |m: &mut MarkedTransaction| { &mut m.block_height },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "index",
                    |m: &MarkedTransaction| { &m.index },
                    |m: &mut MarkedTransaction| { &mut m.index },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<MarkedTransaction>(
                    "MarkedTransaction",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static MarkedTransaction {
        static mut instance: ::protobuf::lazy::Lazy<MarkedTransaction> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const MarkedTransaction,
        };
        unsafe {
            instance.get(MarkedTransaction::new)
        }
    }
}

impl ::protobuf::Clear for MarkedTransaction {
    fn clear(&mut self) {
        self.clear_value();
        self.clear_hash();
        self.clear_id();
        self.clear_token();
        self.clear_addr_from();
        self.clear_addr_to();
        self.clear_block_height();
        self.clear_index();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for MarkedTransaction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for MarkedTransaction {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct BlockchainHeaders {
    // message fields
    pub btc: ::protobuf::RepeatedField<BlockchainHeader>,
    pub eth: ::protobuf::RepeatedField<BlockchainHeader>,
    pub lsk: ::protobuf::RepeatedField<BlockchainHeader>,
    pub neo: ::protobuf::RepeatedField<BlockchainHeader>,
    pub wav: ::protobuf::RepeatedField<BlockchainHeader>,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl BlockchainHeaders {
    pub fn new() -> BlockchainHeaders {
        ::std::default::Default::default()
    }

    // repeated .bc.BlockchainHeader btc = 1;

    pub fn clear_btc(&mut self) {
        self.btc.clear();
    }

    // Param is passed by value, moved
    pub fn set_btc(&mut self, v: ::protobuf::RepeatedField<BlockchainHeader>) {
        self.btc = v;
    }

    // Mutable pointer to the field.
    pub fn mut_btc(&mut self) -> &mut ::protobuf::RepeatedField<BlockchainHeader> {
        &mut self.btc
    }

    // Take field
    pub fn take_btc(&mut self) -> ::protobuf::RepeatedField<BlockchainHeader> {
        ::std::mem::replace(&mut self.btc, ::protobuf::RepeatedField::new())
    }

    pub fn get_btc(&self) -> &[BlockchainHeader] {
        &self.btc
    }

    // repeated .bc.BlockchainHeader eth = 2;

    pub fn clear_eth(&mut self) {
        self.eth.clear();
    }

    // Param is passed by value, moved
    pub fn set_eth(&mut self, v: ::protobuf::RepeatedField<BlockchainHeader>) {
        self.eth = v;
    }

    // Mutable pointer to the field.
    pub fn mut_eth(&mut self) -> &mut ::protobuf::RepeatedField<BlockchainHeader> {
        &mut self.eth
    }

    // Take field
    pub fn take_eth(&mut self) -> ::protobuf::RepeatedField<BlockchainHeader> {
        ::std::mem::replace(&mut self.eth, ::protobuf::RepeatedField::new())
    }

    pub fn get_eth(&self) -> &[BlockchainHeader] {
        &self.eth
    }

    // repeated .bc.BlockchainHeader lsk = 3;

    pub fn clear_lsk(&mut self) {
        self.lsk.clear();
    }

    // Param is passed by value, moved
    pub fn set_lsk(&mut self, v: ::protobuf::RepeatedField<BlockchainHeader>) {
        self.lsk = v;
    }

    // Mutable pointer to the field.
    pub fn mut_lsk(&mut self) -> &mut ::protobuf::RepeatedField<BlockchainHeader> {
        &mut self.lsk
    }

    // Take field
    pub fn take_lsk(&mut self) -> ::protobuf::RepeatedField<BlockchainHeader> {
        ::std::mem::replace(&mut self.lsk, ::protobuf::RepeatedField::new())
    }

    pub fn get_lsk(&self) -> &[BlockchainHeader] {
        &self.lsk
    }

    // repeated .bc.BlockchainHeader neo = 4;

    pub fn clear_neo(&mut self) {
        self.neo.clear();
    }

    // Param is passed by value, moved
    pub fn set_neo(&mut self, v: ::protobuf::RepeatedField<BlockchainHeader>) {
        self.neo = v;
    }

    // Mutable pointer to the field.
    pub fn mut_neo(&mut self) -> &mut ::protobuf::RepeatedField<BlockchainHeader> {
        &mut self.neo
    }

    // Take field
    pub fn take_neo(&mut self) -> ::protobuf::RepeatedField<BlockchainHeader> {
        ::std::mem::replace(&mut self.neo, ::protobuf::RepeatedField::new())
    }

    pub fn get_neo(&self) -> &[BlockchainHeader] {
        &self.neo
    }

    // repeated .bc.BlockchainHeader wav = 5;

    pub fn clear_wav(&mut self) {
        self.wav.clear();
    }

    // Param is passed by value, moved
    pub fn set_wav(&mut self, v: ::protobuf::RepeatedField<BlockchainHeader>) {
        self.wav = v;
    }

    // Mutable pointer to the field.
    pub fn mut_wav(&mut self) -> &mut ::protobuf::RepeatedField<BlockchainHeader> {
        &mut self.wav
    }

    // Take field
    pub fn take_wav(&mut self) -> ::protobuf::RepeatedField<BlockchainHeader> {
        ::std::mem::replace(&mut self.wav, ::protobuf::RepeatedField::new())
    }

    pub fn get_wav(&self) -> &[BlockchainHeader] {
        &self.wav
    }
}

impl ::protobuf::Message for BlockchainHeaders {
    fn is_initialized(&self) -> bool {
        for v in &self.btc {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.eth {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.lsk {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.neo {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.wav {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.btc)?;
                },
                2 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.eth)?;
                },
                3 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.lsk)?;
                },
                4 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.neo)?;
                },
                5 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.wav)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        for value in &self.btc {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.eth {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.lsk {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.neo {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.wav {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        for v in &self.btc {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.eth {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.lsk {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.neo {
            os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.wav {
            os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> BlockchainHeaders {
        BlockchainHeaders::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockchainHeader>>(
                    "btc",
                    |m: &BlockchainHeaders| { &m.btc },
                    |m: &mut BlockchainHeaders| { &mut m.btc },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockchainHeader>>(
                    "eth",
                    |m: &BlockchainHeaders| { &m.eth },
                    |m: &mut BlockchainHeaders| { &mut m.eth },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockchainHeader>>(
                    "lsk",
                    |m: &BlockchainHeaders| { &m.lsk },
                    |m: &mut BlockchainHeaders| { &mut m.lsk },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockchainHeader>>(
                    "neo",
                    |m: &BlockchainHeaders| { &m.neo },
                    |m: &mut BlockchainHeaders| { &mut m.neo },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockchainHeader>>(
                    "wav",
                    |m: &BlockchainHeaders| { &m.wav },
                    |m: &mut BlockchainHeaders| { &mut m.wav },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<BlockchainHeaders>(
                    "BlockchainHeaders",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static BlockchainHeaders {
        static mut instance: ::protobuf::lazy::Lazy<BlockchainHeaders> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const BlockchainHeaders,
        };
        unsafe {
            instance.get(BlockchainHeaders::new)
        }
    }
}

impl ::protobuf::Clear for BlockchainHeaders {
    fn clear(&mut self) {
        self.clear_btc();
        self.clear_eth();
        self.clear_lsk();
        self.clear_neo();
        self.clear_wav();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for BlockchainHeaders {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for BlockchainHeaders {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct BcBlock {
    // message fields
    pub hash: ::std::string::String,
    pub previous_hash: ::std::string::String,
    pub version: u64,
    pub schema_version: u64,
    pub height: u64,
    pub miner: ::std::string::String,
    pub difficulty: ::std::string::String,
    pub timestamp: u64,
    pub merkle_root: ::std::string::String,
    pub chain_root: ::std::string::String,
    pub distance: ::std::string::String,
    pub total_distance: ::std::string::String,
    pub nonce: ::std::string::String,
    pub nrg_grant: u64,
    pub target_hash: ::std::string::String,
    pub target_height: u64,
    pub target_miner: ::std::string::String,
    pub target_signature: ::std::string::String,
    pub twn: u64,
    pub tws: ::protobuf::RepeatedField<::std::string::String>,
    pub emblem_weight: u64,
    pub emblem_chain_block_hash: ::std::string::String,
    pub emblem_chain_fingerprint_root: ::std::string::String,
    pub emblem_chain_address: ::std::string::String,
    pub tx_count: u64,
    pub txs: ::protobuf::RepeatedField<Transaction>,
    pub tx_fee_base: u64,
    pub tx_distance_sum_limit: u64,
    pub blockchain_headers_count: u64,
    pub blockchain_headers: ::protobuf::SingularPtrField<BlockchainHeaders>,
    pub blockchain_fingerprints_root: ::std::string::String,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl BcBlock {
    pub fn new() -> BcBlock {
        ::std::default::Default::default()
    }

    // string hash = 1;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::string::String) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::string::String {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.hash, ::std::string::String::new())
    }

    pub fn get_hash(&self) -> &str {
        &self.hash
    }

    // string previous_hash = 2;

    pub fn clear_previous_hash(&mut self) {
        self.previous_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_previous_hash(&mut self, v: ::std::string::String) {
        self.previous_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_previous_hash(&mut self) -> &mut ::std::string::String {
        &mut self.previous_hash
    }

    // Take field
    pub fn take_previous_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.previous_hash, ::std::string::String::new())
    }

    pub fn get_previous_hash(&self) -> &str {
        &self.previous_hash
    }

    // uint64 version = 3;

    pub fn clear_version(&mut self) {
        self.version = 0;
    }

    // Param is passed by value, moved
    pub fn set_version(&mut self, v: u64) {
        self.version = v;
    }

    pub fn get_version(&self) -> u64 {
        self.version
    }

    // uint64 schema_version = 4;

    pub fn clear_schema_version(&mut self) {
        self.schema_version = 0;
    }

    // Param is passed by value, moved
    pub fn set_schema_version(&mut self, v: u64) {
        self.schema_version = v;
    }

    pub fn get_schema_version(&self) -> u64 {
        self.schema_version
    }

    // uint64 height = 5;

    pub fn clear_height(&mut self) {
        self.height = 0;
    }

    // Param is passed by value, moved
    pub fn set_height(&mut self, v: u64) {
        self.height = v;
    }

    pub fn get_height(&self) -> u64 {
        self.height
    }

    // string miner = 6;

    pub fn clear_miner(&mut self) {
        self.miner.clear();
    }

    // Param is passed by value, moved
    pub fn set_miner(&mut self, v: ::std::string::String) {
        self.miner = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_miner(&mut self) -> &mut ::std::string::String {
        &mut self.miner
    }

    // Take field
    pub fn take_miner(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.miner, ::std::string::String::new())
    }

    pub fn get_miner(&self) -> &str {
        &self.miner
    }

    // string difficulty = 7;

    pub fn clear_difficulty(&mut self) {
        self.difficulty.clear();
    }

    // Param is passed by value, moved
    pub fn set_difficulty(&mut self, v: ::std::string::String) {
        self.difficulty = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_difficulty(&mut self) -> &mut ::std::string::String {
        &mut self.difficulty
    }

    // Take field
    pub fn take_difficulty(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.difficulty, ::std::string::String::new())
    }

    pub fn get_difficulty(&self) -> &str {
        &self.difficulty
    }

    // uint64 timestamp = 8;

    pub fn clear_timestamp(&mut self) {
        self.timestamp = 0;
    }

    // Param is passed by value, moved
    pub fn set_timestamp(&mut self, v: u64) {
        self.timestamp = v;
    }

    pub fn get_timestamp(&self) -> u64 {
        self.timestamp
    }

    // string merkle_root = 9;

    pub fn clear_merkle_root(&mut self) {
        self.merkle_root.clear();
    }

    // Param is passed by value, moved
    pub fn set_merkle_root(&mut self, v: ::std::string::String) {
        self.merkle_root = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_merkle_root(&mut self) -> &mut ::std::string::String {
        &mut self.merkle_root
    }

    // Take field
    pub fn take_merkle_root(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.merkle_root, ::std::string::String::new())
    }

    pub fn get_merkle_root(&self) -> &str {
        &self.merkle_root
    }

    // string chain_root = 10;

    pub fn clear_chain_root(&mut self) {
        self.chain_root.clear();
    }

    // Param is passed by value, moved
    pub fn set_chain_root(&mut self, v: ::std::string::String) {
        self.chain_root = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_chain_root(&mut self) -> &mut ::std::string::String {
        &mut self.chain_root
    }

    // Take field
    pub fn take_chain_root(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.chain_root, ::std::string::String::new())
    }

    pub fn get_chain_root(&self) -> &str {
        &self.chain_root
    }

    // string distance = 11;

    pub fn clear_distance(&mut self) {
        self.distance.clear();
    }

    // Param is passed by value, moved
    pub fn set_distance(&mut self, v: ::std::string::String) {
        self.distance = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_distance(&mut self) -> &mut ::std::string::String {
        &mut self.distance
    }

    // Take field
    pub fn take_distance(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.distance, ::std::string::String::new())
    }

    pub fn get_distance(&self) -> &str {
        &self.distance
    }

    // string total_distance = 12;

    pub fn clear_total_distance(&mut self) {
        self.total_distance.clear();
    }

    // Param is passed by value, moved
    pub fn set_total_distance(&mut self, v: ::std::string::String) {
        self.total_distance = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_total_distance(&mut self) -> &mut ::std::string::String {
        &mut self.total_distance
    }

    // Take field
    pub fn take_total_distance(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.total_distance, ::std::string::String::new())
    }

    pub fn get_total_distance(&self) -> &str {
        &self.total_distance
    }

    // string nonce = 13;

    pub fn clear_nonce(&mut self) {
        self.nonce.clear();
    }

    // Param is passed by value, moved
    pub fn set_nonce(&mut self, v: ::std::string::String) {
        self.nonce = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_nonce(&mut self) -> &mut ::std::string::String {
        &mut self.nonce
    }

    // Take field
    pub fn take_nonce(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.nonce, ::std::string::String::new())
    }

    pub fn get_nonce(&self) -> &str {
        &self.nonce
    }

    // uint64 nrg_grant = 14;

    pub fn clear_nrg_grant(&mut self) {
        self.nrg_grant = 0;
    }

    // Param is passed by value, moved
    pub fn set_nrg_grant(&mut self, v: u64) {
        self.nrg_grant = v;
    }

    pub fn get_nrg_grant(&self) -> u64 {
        self.nrg_grant
    }

    // string target_hash = 15;

    pub fn clear_target_hash(&mut self) {
        self.target_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_target_hash(&mut self, v: ::std::string::String) {
        self.target_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_target_hash(&mut self) -> &mut ::std::string::String {
        &mut self.target_hash
    }

    // Take field
    pub fn take_target_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.target_hash, ::std::string::String::new())
    }

    pub fn get_target_hash(&self) -> &str {
        &self.target_hash
    }

    // uint64 target_height = 16;

    pub fn clear_target_height(&mut self) {
        self.target_height = 0;
    }

    // Param is passed by value, moved
    pub fn set_target_height(&mut self, v: u64) {
        self.target_height = v;
    }

    pub fn get_target_height(&self) -> u64 {
        self.target_height
    }

    // string target_miner = 17;

    pub fn clear_target_miner(&mut self) {
        self.target_miner.clear();
    }

    // Param is passed by value, moved
    pub fn set_target_miner(&mut self, v: ::std::string::String) {
        self.target_miner = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_target_miner(&mut self) -> &mut ::std::string::String {
        &mut self.target_miner
    }

    // Take field
    pub fn take_target_miner(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.target_miner, ::std::string::String::new())
    }

    pub fn get_target_miner(&self) -> &str {
        &self.target_miner
    }

    // string target_signature = 18;

    pub fn clear_target_signature(&mut self) {
        self.target_signature.clear();
    }

    // Param is passed by value, moved
    pub fn set_target_signature(&mut self, v: ::std::string::String) {
        self.target_signature = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_target_signature(&mut self) -> &mut ::std::string::String {
        &mut self.target_signature
    }

    // Take field
    pub fn take_target_signature(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.target_signature, ::std::string::String::new())
    }

    pub fn get_target_signature(&self) -> &str {
        &self.target_signature
    }

    // uint64 twn = 19;

    pub fn clear_twn(&mut self) {
        self.twn = 0;
    }

    // Param is passed by value, moved
    pub fn set_twn(&mut self, v: u64) {
        self.twn = v;
    }

    pub fn get_twn(&self) -> u64 {
        self.twn
    }

    // repeated string tws = 20;

    pub fn clear_tws(&mut self) {
        self.tws.clear();
    }

    // Param is passed by value, moved
    pub fn set_tws(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
        self.tws = v;
    }

    // Mutable pointer to the field.
    pub fn mut_tws(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
        &mut self.tws
    }

    // Take field
    pub fn take_tws(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
        ::std::mem::replace(&mut self.tws, ::protobuf::RepeatedField::new())
    }

    pub fn get_tws(&self) -> &[::std::string::String] {
        &self.tws
    }

    // uint64 emblem_weight = 21;

    pub fn clear_emblem_weight(&mut self) {
        self.emblem_weight = 0;
    }

    // Param is passed by value, moved
    pub fn set_emblem_weight(&mut self, v: u64) {
        self.emblem_weight = v;
    }

    pub fn get_emblem_weight(&self) -> u64 {
        self.emblem_weight
    }

    // string emblem_chain_block_hash = 22;

    pub fn clear_emblem_chain_block_hash(&mut self) {
        self.emblem_chain_block_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_emblem_chain_block_hash(&mut self, v: ::std::string::String) {
        self.emblem_chain_block_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_emblem_chain_block_hash(&mut self) -> &mut ::std::string::String {
        &mut self.emblem_chain_block_hash
    }

    // Take field
    pub fn take_emblem_chain_block_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.emblem_chain_block_hash, ::std::string::String::new())
    }

    pub fn get_emblem_chain_block_hash(&self) -> &str {
        &self.emblem_chain_block_hash
    }

    // string emblem_chain_fingerprint_root = 23;

    pub fn clear_emblem_chain_fingerprint_root(&mut self) {
        self.emblem_chain_fingerprint_root.clear();
    }

    // Param is passed by value, moved
    pub fn set_emblem_chain_fingerprint_root(&mut self, v: ::std::string::String) {
        self.emblem_chain_fingerprint_root = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_emblem_chain_fingerprint_root(&mut self) -> &mut ::std::string::String {
        &mut self.emblem_chain_fingerprint_root
    }

    // Take field
    pub fn take_emblem_chain_fingerprint_root(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.emblem_chain_fingerprint_root, ::std::string::String::new())
    }

    pub fn get_emblem_chain_fingerprint_root(&self) -> &str {
        &self.emblem_chain_fingerprint_root
    }

    // string emblem_chain_address = 24;

    pub fn clear_emblem_chain_address(&mut self) {
        self.emblem_chain_address.clear();
    }

    // Param is passed by value, moved
    pub fn set_emblem_chain_address(&mut self, v: ::std::string::String) {
        self.emblem_chain_address = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_emblem_chain_address(&mut self) -> &mut ::std::string::String {
        &mut self.emblem_chain_address
    }

    // Take field
    pub fn take_emblem_chain_address(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.emblem_chain_address, ::std::string::String::new())
    }

    pub fn get_emblem_chain_address(&self) -> &str {
        &self.emblem_chain_address
    }

    // uint64 tx_count = 25;

    pub fn clear_tx_count(&mut self) {
        self.tx_count = 0;
    }

    // Param is passed by value, moved
    pub fn set_tx_count(&mut self, v: u64) {
        self.tx_count = v;
    }

    pub fn get_tx_count(&self) -> u64 {
        self.tx_count
    }

    // repeated .bc.Transaction txs = 26;

    pub fn clear_txs(&mut self) {
        self.txs.clear();
    }

    // Param is passed by value, moved
    pub fn set_txs(&mut self, v: ::protobuf::RepeatedField<Transaction>) {
        self.txs = v;
    }

    // Mutable pointer to the field.
    pub fn mut_txs(&mut self) -> &mut ::protobuf::RepeatedField<Transaction> {
        &mut self.txs
    }

    // Take field
    pub fn take_txs(&mut self) -> ::protobuf::RepeatedField<Transaction> {
        ::std::mem::replace(&mut self.txs, ::protobuf::RepeatedField::new())
    }

    pub fn get_txs(&self) -> &[Transaction] {
        &self.txs
    }

    // uint64 tx_fee_base = 27;

    pub fn clear_tx_fee_base(&mut self) {
        self.tx_fee_base = 0;
    }

    // Param is passed by value, moved
    pub fn set_tx_fee_base(&mut self, v: u64) {
        self.tx_fee_base = v;
    }

    pub fn get_tx_fee_base(&self) -> u64 {
        self.tx_fee_base
    }

    // uint64 tx_distance_sum_limit = 28;

    pub fn clear_tx_distance_sum_limit(&mut self) {
        self.tx_distance_sum_limit = 0;
    }

    // Param is passed by value, moved
    pub fn set_tx_distance_sum_limit(&mut self, v: u64) {
        self.tx_distance_sum_limit = v;
    }

    pub fn get_tx_distance_sum_limit(&self) -> u64 {
        self.tx_distance_sum_limit
    }

    // uint64 blockchain_headers_count = 29;

    pub fn clear_blockchain_headers_count(&mut self) {
        self.blockchain_headers_count = 0;
    }

    // Param is passed by value, moved
    pub fn set_blockchain_headers_count(&mut self, v: u64) {
        self.blockchain_headers_count = v;
    }

    pub fn get_blockchain_headers_count(&self) -> u64 {
        self.blockchain_headers_count
    }

    // .bc.BlockchainHeaders blockchain_headers = 30;

    pub fn clear_blockchain_headers(&mut self) {
        self.blockchain_headers.clear();
    }

    pub fn has_blockchain_headers(&self) -> bool {
        self.blockchain_headers.is_some()
    }

    // Param is passed by value, moved
    pub fn set_blockchain_headers(&mut self, v: BlockchainHeaders) {
        self.blockchain_headers = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_blockchain_headers(&mut self) -> &mut BlockchainHeaders {
        if self.blockchain_headers.is_none() {
            self.blockchain_headers.set_default();
        }
        self.blockchain_headers.as_mut().unwrap()
    }

    // Take field
    pub fn take_blockchain_headers(&mut self) -> BlockchainHeaders {
        self.blockchain_headers.take().unwrap_or_else(|| BlockchainHeaders::new())
    }

    pub fn get_blockchain_headers(&self) -> &BlockchainHeaders {
        self.blockchain_headers.as_ref().unwrap_or_else(|| BlockchainHeaders::default_instance())
    }

    // string blockchain_fingerprints_root = 31;

    pub fn clear_blockchain_fingerprints_root(&mut self) {
        self.blockchain_fingerprints_root.clear();
    }

    // Param is passed by value, moved
    pub fn set_blockchain_fingerprints_root(&mut self, v: ::std::string::String) {
        self.blockchain_fingerprints_root = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_blockchain_fingerprints_root(&mut self) -> &mut ::std::string::String {
        &mut self.blockchain_fingerprints_root
    }

    // Take field
    pub fn take_blockchain_fingerprints_root(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.blockchain_fingerprints_root, ::std::string::String::new())
    }

    pub fn get_blockchain_fingerprints_root(&self) -> &str {
        &self.blockchain_fingerprints_root
    }
}

impl ::protobuf::Message for BcBlock {
    fn is_initialized(&self) -> bool {
        for v in &self.txs {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.blockchain_headers {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hash)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.previous_hash)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.version = tmp;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.schema_version = tmp;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.height = tmp;
                },
                6 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.miner)?;
                },
                7 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.difficulty)?;
                },
                8 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.timestamp = tmp;
                },
                9 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.merkle_root)?;
                },
                10 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.chain_root)?;
                },
                11 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.distance)?;
                },
                12 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.total_distance)?;
                },
                13 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.nonce)?;
                },
                14 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.nrg_grant = tmp;
                },
                15 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.target_hash)?;
                },
                16 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.target_height = tmp;
                },
                17 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.target_miner)?;
                },
                18 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.target_signature)?;
                },
                19 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.twn = tmp;
                },
                20 => {
                    ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.tws)?;
                },
                21 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.emblem_weight = tmp;
                },
                22 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.emblem_chain_block_hash)?;
                },
                23 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.emblem_chain_fingerprint_root)?;
                },
                24 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.emblem_chain_address)?;
                },
                25 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.tx_count = tmp;
                },
                26 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.txs)?;
                },
                27 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.tx_fee_base = tmp;
                },
                28 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.tx_distance_sum_limit = tmp;
                },
                29 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.blockchain_headers_count = tmp;
                },
                30 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.blockchain_headers)?;
                },
                31 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.blockchain_fingerprints_root)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.hash);
        }
        if !self.previous_hash.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.previous_hash);
        }
        if self.version != 0 {
            my_size += ::protobuf::rt::value_size(3, self.version, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.schema_version != 0 {
            my_size += ::protobuf::rt::value_size(4, self.schema_version, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.height != 0 {
            my_size += ::protobuf::rt::value_size(5, self.height, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.miner.is_empty() {
            my_size += ::protobuf::rt::string_size(6, &self.miner);
        }
        if !self.difficulty.is_empty() {
            my_size += ::protobuf::rt::string_size(7, &self.difficulty);
        }
        if self.timestamp != 0 {
            my_size += ::protobuf::rt::value_size(8, self.timestamp, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.merkle_root.is_empty() {
            my_size += ::protobuf::rt::string_size(9, &self.merkle_root);
        }
        if !self.chain_root.is_empty() {
            my_size += ::protobuf::rt::string_size(10, &self.chain_root);
        }
        if !self.distance.is_empty() {
            my_size += ::protobuf::rt::string_size(11, &self.distance);
        }
        if !self.total_distance.is_empty() {
            my_size += ::protobuf::rt::string_size(12, &self.total_distance);
        }
        if !self.nonce.is_empty() {
            my_size += ::protobuf::rt::string_size(13, &self.nonce);
        }
        if self.nrg_grant != 0 {
            my_size += ::protobuf::rt::value_size(14, self.nrg_grant, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.target_hash.is_empty() {
            my_size += ::protobuf::rt::string_size(15, &self.target_hash);
        }
        if self.target_height != 0 {
            my_size += ::protobuf::rt::value_size(16, self.target_height, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.target_miner.is_empty() {
            my_size += ::protobuf::rt::string_size(17, &self.target_miner);
        }
        if !self.target_signature.is_empty() {
            my_size += ::protobuf::rt::string_size(18, &self.target_signature);
        }
        if self.twn != 0 {
            my_size += ::protobuf::rt::value_size(19, self.twn, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.tws {
            my_size += ::protobuf::rt::string_size(20, &value);
        };
        if self.emblem_weight != 0 {
            my_size += ::protobuf::rt::value_size(21, self.emblem_weight, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.emblem_chain_block_hash.is_empty() {
            my_size += ::protobuf::rt::string_size(22, &self.emblem_chain_block_hash);
        }
        if !self.emblem_chain_fingerprint_root.is_empty() {
            my_size += ::protobuf::rt::string_size(23, &self.emblem_chain_fingerprint_root);
        }
        if !self.emblem_chain_address.is_empty() {
            my_size += ::protobuf::rt::string_size(24, &self.emblem_chain_address);
        }
        if self.tx_count != 0 {
            my_size += ::protobuf::rt::value_size(25, self.tx_count, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.txs {
            let len = value.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        if self.tx_fee_base != 0 {
            my_size += ::protobuf::rt::value_size(27, self.tx_fee_base, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.tx_distance_sum_limit != 0 {
            my_size += ::protobuf::rt::value_size(28, self.tx_distance_sum_limit, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.blockchain_headers_count != 0 {
            my_size += ::protobuf::rt::value_size(29, self.blockchain_headers_count, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.blockchain_headers.as_ref() {
            let len = v.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if !self.blockchain_fingerprints_root.is_empty() {
            my_size += ::protobuf::rt::string_size(31, &self.blockchain_fingerprints_root);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.hash.is_empty() {
            os.write_string(1, &self.hash)?;
        }
        if !self.previous_hash.is_empty() {
            os.write_string(2, &self.previous_hash)?;
        }
        if self.version != 0 {
            os.write_uint64(3, self.version)?;
        }
        if self.schema_version != 0 {
            os.write_uint64(4, self.schema_version)?;
        }
        if self.height != 0 {
            os.write_uint64(5, self.height)?;
        }
        if !self.miner.is_empty() {
            os.write_string(6, &self.miner)?;
        }
        if !self.difficulty.is_empty() {
            os.write_string(7, &self.difficulty)?;
        }
        if self.timestamp != 0 {
            os.write_uint64(8, self.timestamp)?;
        }
        if !self.merkle_root.is_empty() {
            os.write_string(9, &self.merkle_root)?;
        }
        if !self.chain_root.is_empty() {
            os.write_string(10, &self.chain_root)?;
        }
        if !self.distance.is_empty() {
            os.write_string(11, &self.distance)?;
        }
        if !self.total_distance.is_empty() {
            os.write_string(12, &self.total_distance)?;
        }
        if !self.nonce.is_empty() {
            os.write_string(13, &self.nonce)?;
        }
        if self.nrg_grant != 0 {
            os.write_uint64(14, self.nrg_grant)?;
        }
        if !self.target_hash.is_empty() {
            os.write_string(15, &self.target_hash)?;
        }
        if self.target_height != 0 {
            os.write_uint64(16, self.target_height)?;
        }
        if !self.target_miner.is_empty() {
            os.write_string(17, &self.target_miner)?;
        }
        if !self.target_signature.is_empty() {
            os.write_string(18, &self.target_signature)?;
        }
        if self.twn != 0 {
            os.write_uint64(19, self.twn)?;
        }
        for v in &self.tws {
            os.write_string(20, &v)?;
        };
        if self.emblem_weight != 0 {
            os.write_uint64(21, self.emblem_weight)?;
        }
        if !self.emblem_chain_block_hash.is_empty() {
            os.write_string(22, &self.emblem_chain_block_hash)?;
        }
        if !self.emblem_chain_fingerprint_root.is_empty() {
            os.write_string(23, &self.emblem_chain_fingerprint_root)?;
        }
        if !self.emblem_chain_address.is_empty() {
            os.write_string(24, &self.emblem_chain_address)?;
        }
        if self.tx_count != 0 {
            os.write_uint64(25, self.tx_count)?;
        }
        for v in &self.txs {
            os.write_tag(26, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        if self.tx_fee_base != 0 {
            os.write_uint64(27, self.tx_fee_base)?;
        }
        if self.tx_distance_sum_limit != 0 {
            os.write_uint64(28, self.tx_distance_sum_limit)?;
        }
        if self.blockchain_headers_count != 0 {
            os.write_uint64(29, self.blockchain_headers_count)?;
        }
        if let Some(ref v) = self.blockchain_headers.as_ref() {
            os.write_tag(30, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if !self.blockchain_fingerprints_root.is_empty() {
            os.write_string(31, &self.blockchain_fingerprints_root)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> BcBlock {
        BcBlock::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "hash",
                    |m: &BcBlock| { &m.hash },
                    |m: &mut BcBlock| { &mut m.hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "previous_hash",
                    |m: &BcBlock| { &m.previous_hash },
                    |m: &mut BcBlock| { &mut m.previous_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "version",
                    |m: &BcBlock| { &m.version },
                    |m: &mut BcBlock| { &mut m.version },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "schema_version",
                    |m: &BcBlock| { &m.schema_version },
                    |m: &mut BcBlock| { &mut m.schema_version },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "height",
                    |m: &BcBlock| { &m.height },
                    |m: &mut BcBlock| { &mut m.height },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "miner",
                    |m: &BcBlock| { &m.miner },
                    |m: &mut BcBlock| { &mut m.miner },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "difficulty",
                    |m: &BcBlock| { &m.difficulty },
                    |m: &mut BcBlock| { &mut m.difficulty },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "timestamp",
                    |m: &BcBlock| { &m.timestamp },
                    |m: &mut BcBlock| { &mut m.timestamp },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "merkle_root",
                    |m: &BcBlock| { &m.merkle_root },
                    |m: &mut BcBlock| { &mut m.merkle_root },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "chain_root",
                    |m: &BcBlock| { &m.chain_root },
                    |m: &mut BcBlock| { &mut m.chain_root },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "distance",
                    |m: &BcBlock| { &m.distance },
                    |m: &mut BcBlock| { &mut m.distance },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "total_distance",
                    |m: &BcBlock| { &m.total_distance },
                    |m: &mut BcBlock| { &mut m.total_distance },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "nonce",
                    |m: &BcBlock| { &m.nonce },
                    |m: &mut BcBlock| { &mut m.nonce },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "nrg_grant",
                    |m: &BcBlock| { &m.nrg_grant },
                    |m: &mut BcBlock| { &mut m.nrg_grant },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "target_hash",
                    |m: &BcBlock| { &m.target_hash },
                    |m: &mut BcBlock| { &mut m.target_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "target_height",
                    |m: &BcBlock| { &m.target_height },
                    |m: &mut BcBlock| { &mut m.target_height },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "target_miner",
                    |m: &BcBlock| { &m.target_miner },
                    |m: &mut BcBlock| { &mut m.target_miner },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "target_signature",
                    |m: &BcBlock| { &m.target_signature },
                    |m: &mut BcBlock| { &mut m.target_signature },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "twn",
                    |m: &BcBlock| { &m.twn },
                    |m: &mut BcBlock| { &mut m.twn },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "tws",
                    |m: &BcBlock| { &m.tws },
                    |m: &mut BcBlock| { &mut m.tws },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "emblem_weight",
                    |m: &BcBlock| { &m.emblem_weight },
                    |m: &mut BcBlock| { &mut m.emblem_weight },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "emblem_chain_block_hash",
                    |m: &BcBlock| { &m.emblem_chain_block_hash },
                    |m: &mut BcBlock| { &mut m.emblem_chain_block_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "emblem_chain_fingerprint_root",
                    |m: &BcBlock| { &m.emblem_chain_fingerprint_root },
                    |m: &mut BcBlock| { &mut m.emblem_chain_fingerprint_root },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "emblem_chain_address",
                    |m: &BcBlock| { &m.emblem_chain_address },
                    |m: &mut BcBlock| { &mut m.emblem_chain_address },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "tx_count",
                    |m: &BcBlock| { &m.tx_count },
                    |m: &mut BcBlock| { &mut m.tx_count },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Transaction>>(
                    "txs",
                    |m: &BcBlock| { &m.txs },
                    |m: &mut BcBlock| { &mut m.txs },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "tx_fee_base",
                    |m: &BcBlock| { &m.tx_fee_base },
                    |m: &mut BcBlock| { &mut m.tx_fee_base },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "tx_distance_sum_limit",
                    |m: &BcBlock| { &m.tx_distance_sum_limit },
                    |m: &mut BcBlock| { &mut m.tx_distance_sum_limit },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "blockchain_headers_count",
                    |m: &BcBlock| { &m.blockchain_headers_count },
                    |m: &mut BcBlock| { &mut m.blockchain_headers_count },
                ));
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BlockchainHeaders>>(
                    "blockchain_headers",
                    |m: &BcBlock| { &m.blockchain_headers },
                    |m: &mut BcBlock| { &mut m.blockchain_headers },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "blockchain_fingerprints_root",
                    |m: &BcBlock| { &m.blockchain_fingerprints_root },
                    |m: &mut BcBlock| { &mut m.blockchain_fingerprints_root },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<BcBlock>(
                    "BcBlock",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static BcBlock {
        static mut instance: ::protobuf::lazy::Lazy<BcBlock> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const BcBlock,
        };
        unsafe {
            instance.get(BcBlock::new)
        }
    }
}

impl ::protobuf::Clear for BcBlock {
    fn clear(&mut self) {
        self.clear_hash();
        self.clear_previous_hash();
        self.clear_version();
        self.clear_schema_version();
        self.clear_height();
        self.clear_miner();
        self.clear_difficulty();
        self.clear_timestamp();
        self.clear_merkle_root();
        self.clear_chain_root();
        self.clear_distance();
        self.clear_total_distance();
        self.clear_nonce();
        self.clear_nrg_grant();
        self.clear_target_hash();
        self.clear_target_height();
        self.clear_target_miner();
        self.clear_target_signature();
        self.clear_twn();
        self.clear_tws();
        self.clear_emblem_weight();
        self.clear_emblem_chain_block_hash();
        self.clear_emblem_chain_fingerprint_root();
        self.clear_emblem_chain_address();
        self.clear_tx_count();
        self.clear_txs();
        self.clear_tx_fee_base();
        self.clear_tx_distance_sum_limit();
        self.clear_blockchain_headers_count();
        self.clear_blockchain_headers();
        self.clear_blockchain_fingerprints_root();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for BcBlock {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for BcBlock {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct OutPoint {
    // message fields
    pub value: ::std::vec::Vec<u8>,
    pub hash: ::std::string::String,
    pub index: u64,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl OutPoint {
    pub fn new() -> OutPoint {
        ::std::default::Default::default()
    }

    // bytes value = 1;

    pub fn clear_value(&mut self) {
        self.value.clear();
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
        self.value = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.value
    }

    // Take field
    pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.value, ::std::vec::Vec::new())
    }

    pub fn get_value(&self) -> &[u8] {
        &self.value
    }

    // string hash = 2;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::string::String) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::string::String {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.hash, ::std::string::String::new())
    }

    pub fn get_hash(&self) -> &str {
        &self.hash
    }

    // uint64 index = 3;

    pub fn clear_index(&mut self) {
        self.index = 0;
    }

    // Param is passed by value, moved
    pub fn set_index(&mut self, v: u64) {
        self.index = v;
    }

    pub fn get_index(&self) -> u64 {
        self.index
    }
}

impl ::protobuf::Message for OutPoint {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hash)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.index = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.value.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.value);
        }
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.hash);
        }
        if self.index != 0 {
            my_size += ::protobuf::rt::value_size(3, self.index, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.value.is_empty() {
            os.write_bytes(1, &self.value)?;
        }
        if !self.hash.is_empty() {
            os.write_string(2, &self.hash)?;
        }
        if self.index != 0 {
            os.write_uint64(3, self.index)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> OutPoint {
        OutPoint::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "value",
                    |m: &OutPoint| { &m.value },
                    |m: &mut OutPoint| { &mut m.value },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "hash",
                    |m: &OutPoint| { &m.hash },
                    |m: &mut OutPoint| { &mut m.hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "index",
                    |m: &OutPoint| { &m.index },
                    |m: &mut OutPoint| { &mut m.index },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<OutPoint>(
                    "OutPoint",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static OutPoint {
        static mut instance: ::protobuf::lazy::Lazy<OutPoint> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const OutPoint,
        };
        unsafe {
            instance.get(OutPoint::new)
        }
    }
}

impl ::protobuf::Clear for OutPoint {
    fn clear(&mut self) {
        self.clear_value();
        self.clear_hash();
        self.clear_index();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for OutPoint {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for OutPoint {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct Transaction {
    // message fields
    pub version: u64,
    pub nonce: ::std::string::String,
    pub hash: ::std::string::String,
    pub overline: ::std::string::String,
    pub nin_count: u64,
    pub nout_count: u64,
    pub inputs: ::protobuf::RepeatedField<TransactionInput>,
    pub outputs: ::protobuf::RepeatedField<TransactionOutput>,
    pub lock_time: u32,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl Transaction {
    pub fn new() -> Transaction {
        ::std::default::Default::default()
    }

    // uint64 version = 1;

    pub fn clear_version(&mut self) {
        self.version = 0;
    }

    // Param is passed by value, moved
    pub fn set_version(&mut self, v: u64) {
        self.version = v;
    }

    pub fn get_version(&self) -> u64 {
        self.version
    }

    // string nonce = 2;

    pub fn clear_nonce(&mut self) {
        self.nonce.clear();
    }

    // Param is passed by value, moved
    pub fn set_nonce(&mut self, v: ::std::string::String) {
        self.nonce = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_nonce(&mut self) -> &mut ::std::string::String {
        &mut self.nonce
    }

    // Take field
    pub fn take_nonce(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.nonce, ::std::string::String::new())
    }

    pub fn get_nonce(&self) -> &str {
        &self.nonce
    }

    // string hash = 3;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::string::String) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::string::String {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.hash, ::std::string::String::new())
    }

    pub fn get_hash(&self) -> &str {
        &self.hash
    }

    // string overline = 4;

    pub fn clear_overline(&mut self) {
        self.overline.clear();
    }

    // Param is passed by value, moved
    pub fn set_overline(&mut self, v: ::std::string::String) {
        self.overline = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_overline(&mut self) -> &mut ::std::string::String {
        &mut self.overline
    }

    // Take field
    pub fn take_overline(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.overline, ::std::string::String::new())
    }

    pub fn get_overline(&self) -> &str {
        &self.overline
    }

    // uint64 nin_count = 5;

    pub fn clear_nin_count(&mut self) {
        self.nin_count = 0;
    }

    // Param is passed by value, moved
    pub fn set_nin_count(&mut self, v: u64) {
        self.nin_count = v;
    }

    pub fn get_nin_count(&self) -> u64 {
        self.nin_count
    }

    // uint64 nout_count = 6;

    pub fn clear_nout_count(&mut self) {
        self.nout_count = 0;
    }

    // Param is passed by value, moved
    pub fn set_nout_count(&mut self, v: u64) {
        self.nout_count = v;
    }

    pub fn get_nout_count(&self) -> u64 {
        self.nout_count
    }

    // repeated .bc.TransactionInput inputs = 7;

    pub fn clear_inputs(&mut self) {
        self.inputs.clear();
    }

    // Param is passed by value, moved
    pub fn set_inputs(&mut self, v: ::protobuf::RepeatedField<TransactionInput>) {
        self.inputs = v;
    }

    // Mutable pointer to the field.
    pub fn mut_inputs(&mut self) -> &mut ::protobuf::RepeatedField<TransactionInput> {
        &mut self.inputs
    }

    // Take field
    pub fn take_inputs(&mut self) -> ::protobuf::RepeatedField<TransactionInput> {
        ::std::mem::replace(&mut self.inputs, ::protobuf::RepeatedField::new())
    }

    pub fn get_inputs(&self) -> &[TransactionInput] {
        &self.inputs
    }

    // repeated .bc.TransactionOutput outputs = 8;

    pub fn clear_outputs(&mut self) {
        self.outputs.clear();
    }

    // Param is passed by value, moved
    pub fn set_outputs(&mut self, v: ::protobuf::RepeatedField<TransactionOutput>) {
        self.outputs = v;
    }

    // Mutable pointer to the field.
    pub fn mut_outputs(&mut self) -> &mut ::protobuf::RepeatedField<TransactionOutput> {
        &mut self.outputs
    }

    // Take field
    pub fn take_outputs(&mut self) -> ::protobuf::RepeatedField<TransactionOutput> {
        ::std::mem::replace(&mut self.outputs, ::protobuf::RepeatedField::new())
    }

    pub fn get_outputs(&self) -> &[TransactionOutput] {
        &self.outputs
    }

    // uint32 lock_time = 9;

    pub fn clear_lock_time(&mut self) {
        self.lock_time = 0;
    }

    // Param is passed by value, moved
    pub fn set_lock_time(&mut self, v: u32) {
        self.lock_time = v;
    }

    pub fn get_lock_time(&self) -> u32 {
        self.lock_time
    }
}

impl ::protobuf::Message for Transaction {
    fn is_initialized(&self) -> bool {
        for v in &self.inputs {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.outputs {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.version = tmp;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.nonce)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hash)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.overline)?;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.nin_count = tmp;
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.nout_count = tmp;
                },
                7 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.inputs)?;
                },
                8 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.outputs)?;
                },
                9 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.lock_time = tmp;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if self.version != 0 {
            my_size += ::protobuf::rt::value_size(1, self.version, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.nonce.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.nonce);
        }
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.hash);
        }
        if !self.overline.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.overline);
        }
        if self.nin_count != 0 {
            my_size += ::protobuf::rt::value_size(5, self.nin_count, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.nout_count != 0 {
            my_size += ::protobuf::rt::value_size(6, self.nout_count, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.inputs {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.outputs {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        if self.lock_time != 0 {
            my_size += ::protobuf::rt::value_size(9, self.lock_time, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if self.version != 0 {
            os.write_uint64(1, self.version)?;
        }
        if !self.nonce.is_empty() {
            os.write_string(2, &self.nonce)?;
        }
        if !self.hash.is_empty() {
            os.write_string(3, &self.hash)?;
        }
        if !self.overline.is_empty() {
            os.write_string(4, &self.overline)?;
        }
        if self.nin_count != 0 {
            os.write_uint64(5, self.nin_count)?;
        }
        if self.nout_count != 0 {
            os.write_uint64(6, self.nout_count)?;
        }
        for v in &self.inputs {
            os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.outputs {
            os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        if self.lock_time != 0 {
            os.write_uint32(9, self.lock_time)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Transaction {
        Transaction::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "version",
                    |m: &Transaction| { &m.version },
                    |m: &mut Transaction| { &mut m.version },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "nonce",
                    |m: &Transaction| { &m.nonce },
                    |m: &mut Transaction| { &mut m.nonce },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "hash",
                    |m: &Transaction| { &m.hash },
                    |m: &mut Transaction| { &mut m.hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "overline",
                    |m: &Transaction| { &m.overline },
                    |m: &mut Transaction| { &mut m.overline },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "nin_count",
                    |m: &Transaction| { &m.nin_count },
                    |m: &mut Transaction| { &mut m.nin_count },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "nout_count",
                    |m: &Transaction| { &m.nout_count },
                    |m: &mut Transaction| { &mut m.nout_count },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TransactionInput>>(
                    "inputs",
                    |m: &Transaction| { &m.inputs },
                    |m: &mut Transaction| { &mut m.inputs },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TransactionOutput>>(
                    "outputs",
                    |m: &Transaction| { &m.outputs },
                    |m: &mut Transaction| { &mut m.outputs },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                    "lock_time",
                    |m: &Transaction| { &m.lock_time },
                    |m: &mut Transaction| { &mut m.lock_time },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<Transaction>(
                    "Transaction",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static Transaction {
        static mut instance: ::protobuf::lazy::Lazy<Transaction> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const Transaction,
        };
        unsafe {
            instance.get(Transaction::new)
        }
    }
}

impl ::protobuf::Clear for Transaction {
    fn clear(&mut self) {
        self.clear_version();
        self.clear_nonce();
        self.clear_hash();
        self.clear_overline();
        self.clear_nin_count();
        self.clear_nout_count();
        self.clear_inputs();
        self.clear_outputs();
        self.clear_lock_time();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for Transaction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Transaction {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct TransactionInput {
    // message fields
    pub out_point: ::protobuf::SingularPtrField<OutPoint>,
    pub script_length: u32,
    pub input_script: ::std::vec::Vec<u8>,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl TransactionInput {
    pub fn new() -> TransactionInput {
        ::std::default::Default::default()
    }

    // .bc.OutPoint out_point = 1;

    pub fn clear_out_point(&mut self) {
        self.out_point.clear();
    }

    pub fn has_out_point(&self) -> bool {
        self.out_point.is_some()
    }

    // Param is passed by value, moved
    pub fn set_out_point(&mut self, v: OutPoint) {
        self.out_point = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_out_point(&mut self) -> &mut OutPoint {
        if self.out_point.is_none() {
            self.out_point.set_default();
        }
        self.out_point.as_mut().unwrap()
    }

    // Take field
    pub fn take_out_point(&mut self) -> OutPoint {
        self.out_point.take().unwrap_or_else(|| OutPoint::new())
    }

    pub fn get_out_point(&self) -> &OutPoint {
        self.out_point.as_ref().unwrap_or_else(|| OutPoint::default_instance())
    }

    // uint32 script_length = 2;

    pub fn clear_script_length(&mut self) {
        self.script_length = 0;
    }

    // Param is passed by value, moved
    pub fn set_script_length(&mut self, v: u32) {
        self.script_length = v;
    }

    pub fn get_script_length(&self) -> u32 {
        self.script_length
    }

    // bytes input_script = 3;

    pub fn clear_input_script(&mut self) {
        self.input_script.clear();
    }

    // Param is passed by value, moved
    pub fn set_input_script(&mut self, v: ::std::vec::Vec<u8>) {
        self.input_script = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_input_script(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.input_script
    }

    // Take field
    pub fn take_input_script(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.input_script, ::std::vec::Vec::new())
    }

    pub fn get_input_script(&self) -> &[u8] {
        &self.input_script
    }
}

impl ::protobuf::Message for TransactionInput {
    fn is_initialized(&self) -> bool {
        for v in &self.out_point {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.out_point)?;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.script_length = tmp;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.input_script)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(ref v) = self.out_point.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if self.script_length != 0 {
            my_size += ::protobuf::rt::value_size(2, self.script_length, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.input_script.is_empty() {
            my_size += ::protobuf::rt::bytes_size(3, &self.input_script);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if let Some(ref v) = self.out_point.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if self.script_length != 0 {
            os.write_uint32(2, self.script_length)?;
        }
        if !self.input_script.is_empty() {
            os.write_bytes(3, &self.input_script)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> TransactionInput {
        TransactionInput::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<OutPoint>>(
                    "out_point",
                    |m: &TransactionInput| { &m.out_point },
                    |m: &mut TransactionInput| { &mut m.out_point },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                    "script_length",
                    |m: &TransactionInput| { &m.script_length },
                    |m: &mut TransactionInput| { &mut m.script_length },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "input_script",
                    |m: &TransactionInput| { &m.input_script },
                    |m: &mut TransactionInput| { &mut m.input_script },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<TransactionInput>(
                    "TransactionInput",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static TransactionInput {
        static mut instance: ::protobuf::lazy::Lazy<TransactionInput> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const TransactionInput,
        };
        unsafe {
            instance.get(TransactionInput::new)
        }
    }
}

impl ::protobuf::Clear for TransactionInput {
    fn clear(&mut self) {
        self.clear_out_point();
        self.clear_script_length();
        self.clear_input_script();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for TransactionInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TransactionInput {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct TransactionOutput {
    // message fields
    pub value: ::std::vec::Vec<u8>,
    pub unit: ::std::vec::Vec<u8>,
    pub script_length: u32,
    pub output_script: ::std::vec::Vec<u8>,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl TransactionOutput {
    pub fn new() -> TransactionOutput {
        ::std::default::Default::default()
    }

    // bytes value = 1;

    pub fn clear_value(&mut self) {
        self.value.clear();
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
        self.value = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.value
    }

    // Take field
    pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.value, ::std::vec::Vec::new())
    }

    pub fn get_value(&self) -> &[u8] {
        &self.value
    }

    // bytes unit = 2;

    pub fn clear_unit(&mut self) {
        self.unit.clear();
    }

    // Param is passed by value, moved
    pub fn set_unit(&mut self, v: ::std::vec::Vec<u8>) {
        self.unit = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_unit(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.unit
    }

    // Take field
    pub fn take_unit(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.unit, ::std::vec::Vec::new())
    }

    pub fn get_unit(&self) -> &[u8] {
        &self.unit
    }

    // uint32 script_length = 3;

    pub fn clear_script_length(&mut self) {
        self.script_length = 0;
    }

    // Param is passed by value, moved
    pub fn set_script_length(&mut self, v: u32) {
        self.script_length = v;
    }

    pub fn get_script_length(&self) -> u32 {
        self.script_length
    }

    // bytes output_script = 4;

    pub fn clear_output_script(&mut self) {
        self.output_script.clear();
    }

    // Param is passed by value, moved
    pub fn set_output_script(&mut self, v: ::std::vec::Vec<u8>) {
        self.output_script = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_output_script(&mut self) -> &mut ::std::vec::Vec<u8> {
        &mut self.output_script
    }

    // Take field
    pub fn take_output_script(&mut self) -> ::std::vec::Vec<u8> {
        ::std::mem::replace(&mut self.output_script, ::std::vec::Vec::new())
    }

    pub fn get_output_script(&self) -> &[u8] {
        &self.output_script
    }
}

impl ::protobuf::Message for TransactionOutput {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.unit)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.script_length = tmp;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.output_script)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.value.is_empty() {
            my_size += ::protobuf::rt::bytes_size(1, &self.value);
        }
        if !self.unit.is_empty() {
            my_size += ::protobuf::rt::bytes_size(2, &self.unit);
        }
        if self.script_length != 0 {
            my_size += ::protobuf::rt::value_size(3, self.script_length, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.output_script.is_empty() {
            my_size += ::protobuf::rt::bytes_size(4, &self.output_script);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.value.is_empty() {
            os.write_bytes(1, &self.value)?;
        }
        if !self.unit.is_empty() {
            os.write_bytes(2, &self.unit)?;
        }
        if self.script_length != 0 {
            os.write_uint32(3, self.script_length)?;
        }
        if !self.output_script.is_empty() {
            os.write_bytes(4, &self.output_script)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> TransactionOutput {
        TransactionOutput::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "value",
                    |m: &TransactionOutput| { &m.value },
                    |m: &mut TransactionOutput| { &mut m.value },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "unit",
                    |m: &TransactionOutput| { &m.unit },
                    |m: &mut TransactionOutput| { &mut m.unit },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                    "script_length",
                    |m: &TransactionOutput| { &m.script_length },
                    |m: &mut TransactionOutput| { &mut m.script_length },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
                    "output_script",
                    |m: &TransactionOutput| { &m.output_script },
                    |m: &mut TransactionOutput| { &mut m.output_script },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<TransactionOutput>(
                    "TransactionOutput",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static TransactionOutput {
        static mut instance: ::protobuf::lazy::Lazy<TransactionOutput> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const TransactionOutput,
        };
        unsafe {
            instance.get(TransactionOutput::new)
        }
    }
}

impl ::protobuf::Clear for TransactionOutput {
    fn clear(&mut self) {
        self.clear_value();
        self.clear_unit();
        self.clear_script_length();
        self.clear_output_script();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for TransactionOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for TransactionOutput {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct BlockchainHeader {
    // message fields
    pub blockchain: ::std::string::String,
    pub hash: ::std::string::String,
    pub previous_hash: ::std::string::String,
    pub timestamp: u64,
    pub height: u64,
    pub merkle_root: ::std::string::String,
    pub blockchain_confirmations_in_parent_count: u64,
    pub marked_txs: ::protobuf::RepeatedField<MarkedTransaction>,
    // special fields
    unknown_fields: ::protobuf::UnknownFields,
    cached_size: ::protobuf::CachedSize,
}

impl BlockchainHeader {
    pub fn new() -> BlockchainHeader {
        ::std::default::Default::default()
    }

    // string blockchain = 1;

    pub fn clear_blockchain(&mut self) {
        self.blockchain.clear();
    }

    // Param is passed by value, moved
    pub fn set_blockchain(&mut self, v: ::std::string::String) {
        self.blockchain = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_blockchain(&mut self) -> &mut ::std::string::String {
        &mut self.blockchain
    }

    // Take field
    pub fn take_blockchain(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.blockchain, ::std::string::String::new())
    }

    pub fn get_blockchain(&self) -> &str {
        &self.blockchain
    }

    // string hash = 2;

    pub fn clear_hash(&mut self) {
        self.hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_hash(&mut self, v: ::std::string::String) {
        self.hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hash(&mut self) -> &mut ::std::string::String {
        &mut self.hash
    }

    // Take field
    pub fn take_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.hash, ::std::string::String::new())
    }

    pub fn get_hash(&self) -> &str {
        &self.hash
    }

    // string previous_hash = 3;

    pub fn clear_previous_hash(&mut self) {
        self.previous_hash.clear();
    }

    // Param is passed by value, moved
    pub fn set_previous_hash(&mut self, v: ::std::string::String) {
        self.previous_hash = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_previous_hash(&mut self) -> &mut ::std::string::String {
        &mut self.previous_hash
    }

    // Take field
    pub fn take_previous_hash(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.previous_hash, ::std::string::String::new())
    }

    pub fn get_previous_hash(&self) -> &str {
        &self.previous_hash
    }

    // uint64 timestamp = 4;

    pub fn clear_timestamp(&mut self) {
        self.timestamp = 0;
    }

    // Param is passed by value, moved
    pub fn set_timestamp(&mut self, v: u64) {
        self.timestamp = v;
    }

    pub fn get_timestamp(&self) -> u64 {
        self.timestamp
    }

    // uint64 height = 5;

    pub fn clear_height(&mut self) {
        self.height = 0;
    }

    // Param is passed by value, moved
    pub fn set_height(&mut self, v: u64) {
        self.height = v;
    }

    pub fn get_height(&self) -> u64 {
        self.height
    }

    // string merkle_root = 6;

    pub fn clear_merkle_root(&mut self) {
        self.merkle_root.clear();
    }

    // Param is passed by value, moved
    pub fn set_merkle_root(&mut self, v: ::std::string::String) {
        self.merkle_root = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_merkle_root(&mut self) -> &mut ::std::string::String {
        &mut self.merkle_root
    }

    // Take field
    pub fn take_merkle_root(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.merkle_root, ::std::string::String::new())
    }

    pub fn get_merkle_root(&self) -> &str {
        &self.merkle_root
    }

    // uint64 blockchain_confirmations_in_parent_count = 7;

    pub fn clear_blockchain_confirmations_in_parent_count(&mut self) {
        self.blockchain_confirmations_in_parent_count = 0;
    }

    // Param is passed by value, moved
    pub fn set_blockchain_confirmations_in_parent_count(&mut self, v: u64) {
        self.blockchain_confirmations_in_parent_count = v;
    }

    pub fn get_blockchain_confirmations_in_parent_count(&self) -> u64 {
        self.blockchain_confirmations_in_parent_count
    }

    // repeated .bc.MarkedTransaction marked_txs = 8;

    pub fn clear_marked_txs(&mut self) {
        self.marked_txs.clear();
    }

    // Param is passed by value, moved
    pub fn set_marked_txs(&mut self, v: ::protobuf::RepeatedField<MarkedTransaction>) {
        self.marked_txs = v;
    }

    // Mutable pointer to the field.
    pub fn mut_marked_txs(&mut self) -> &mut ::protobuf::RepeatedField<MarkedTransaction> {
        &mut self.marked_txs
    }

    // Take field
    pub fn take_marked_txs(&mut self) -> ::protobuf::RepeatedField<MarkedTransaction> {
        ::std::mem::replace(&mut self.marked_txs, ::protobuf::RepeatedField::new())
    }

    pub fn get_marked_txs(&self) -> &[MarkedTransaction] {
        &self.marked_txs
    }
}

impl ::protobuf::Message for BlockchainHeader {
    fn is_initialized(&self) -> bool {
        for v in &self.marked_txs {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.blockchain)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hash)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.previous_hash)?;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.timestamp = tmp;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.height = tmp;
                },
                6 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.merkle_root)?;
                },
                7 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint64()?;
                    self.blockchain_confirmations_in_parent_count = tmp;
                },
                8 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.marked_txs)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if !self.blockchain.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.blockchain);
        }
        if !self.hash.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.hash);
        }
        if !self.previous_hash.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.previous_hash);
        }
        if self.timestamp != 0 {
            my_size += ::protobuf::rt::value_size(4, self.timestamp, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.height != 0 {
            my_size += ::protobuf::rt::value_size(5, self.height, ::protobuf::wire_format::WireTypeVarint);
        }
        if !self.merkle_root.is_empty() {
            my_size += ::protobuf::rt::string_size(6, &self.merkle_root);
        }
        if self.blockchain_confirmations_in_parent_count != 0 {
            my_size += ::protobuf::rt::value_size(7, self.blockchain_confirmations_in_parent_count, ::protobuf::wire_format::WireTypeVarint);
        }
        for value in &self.marked_txs {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
        if !self.blockchain.is_empty() {
            os.write_string(1, &self.blockchain)?;
        }
        if !self.hash.is_empty() {
            os.write_string(2, &self.hash)?;
        }
        if !self.previous_hash.is_empty() {
            os.write_string(3, &self.previous_hash)?;
        }
        if self.timestamp != 0 {
            os.write_uint64(4, self.timestamp)?;
        }
        if self.height != 0 {
            os.write_uint64(5, self.height)?;
        }
        if !self.merkle_root.is_empty() {
            os.write_string(6, &self.merkle_root)?;
        }
        if self.blockchain_confirmations_in_parent_count != 0 {
            os.write_uint64(7, self.blockchain_confirmations_in_parent_count)?;
        }
        for v in &self.marked_txs {
            os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &::std::any::Any {
        self as &::std::any::Any
    }
    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
        self as &mut ::std::any::Any
    }
    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> BlockchainHeader {
        BlockchainHeader::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                let mut fields = ::std::vec::Vec::new();
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "blockchain",
                    |m: &BlockchainHeader| { &m.blockchain },
                    |m: &mut BlockchainHeader| { &mut m.blockchain },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "hash",
                    |m: &BlockchainHeader| { &m.hash },
                    |m: &mut BlockchainHeader| { &mut m.hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "previous_hash",
                    |m: &BlockchainHeader| { &m.previous_hash },
                    |m: &mut BlockchainHeader| { &mut m.previous_hash },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "timestamp",
                    |m: &BlockchainHeader| { &m.timestamp },
                    |m: &mut BlockchainHeader| { &mut m.timestamp },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "height",
                    |m: &BlockchainHeader| { &m.height },
                    |m: &mut BlockchainHeader| { &mut m.height },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                    "merkle_root",
                    |m: &BlockchainHeader| { &m.merkle_root },
                    |m: &mut BlockchainHeader| { &mut m.merkle_root },
                ));
                fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
                    "blockchain_confirmations_in_parent_count",
                    |m: &BlockchainHeader| { &m.blockchain_confirmations_in_parent_count },
                    |m: &mut BlockchainHeader| { &mut m.blockchain_confirmations_in_parent_count },
                ));
                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<MarkedTransaction>>(
                    "marked_txs",
                    |m: &BlockchainHeader| { &m.marked_txs },
                    |m: &mut BlockchainHeader| { &mut m.marked_txs },
                ));
                ::protobuf::reflect::MessageDescriptor::new::<BlockchainHeader>(
                    "BlockchainHeader",
                    fields,
                    file_descriptor_proto()
                )
            })
        }
    }

    fn default_instance() -> &'static BlockchainHeader {
        static mut instance: ::protobuf::lazy::Lazy<BlockchainHeader> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const BlockchainHeader,
        };
        unsafe {
            instance.get(BlockchainHeader::new)
        }
    }
}

impl ::protobuf::Clear for BlockchainHeader {
    fn clear(&mut self) {
        self.clear_blockchain();
        self.clear_hash();
        self.clear_previous_hash();
        self.clear_timestamp();
        self.clear_height();
        self.clear_merkle_root();
        self.clear_blockchain_confirmations_in_parent_count();
        self.clear_marked_txs();
        self.unknown_fields.clear();
    }
}

impl ::std::fmt::Debug for BlockchainHeader {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for BlockchainHeader {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Message(self)
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\ncore.proto\x12\x02bc\"\x06\n\x04Null\"\x94\x02\n\x05Block\x12\x1e\n\
    \nblockchain\x18\x01\x20\x01(\tR\nblockchain\x12\x12\n\x04hash\x18\x02\
    \x20\x01(\tR\x04hash\x12#\n\rprevious_hash\x18\x03\x20\x01(\tR\x0cprevio\
    usHash\x12\x1c\n\ttimestamp\x18\x04\x20\x01(\x04R\ttimestamp\x12\x16\n\
    \x06height\x18\x05\x20\x01(\x04R\x06height\x12\x1f\n\x0bmerkle_root\x18\
    \x06\x20\x01(\tR\nmerkleRoot\x12%\n\x0emarkedtx_count\x18\x07\x20\x01(\
    \x04R\rmarkedtxCount\x124\n\nmarked_txs\x18\x08\x20\x03(\x0b2\x15.bc.Mar\
    kedTransactionR\tmarkedTxs\"\xd2\x01\n\x11MarkedTransaction\x12\x14\n\
    \x05value\x18\x01\x20\x01(\rR\x05value\x12\x12\n\x04hash\x18\x02\x20\x01\
    (\tR\x04hash\x12\x0e\n\x02id\x18\x03\x20\x01(\tR\x02id\x12\x14\n\x05toke\
    n\x18\x04\x20\x01(\tR\x05token\x12\x1b\n\taddr_from\x18\x05\x20\x01(\tR\
    \x08addrFrom\x12\x17\n\x07addr_to\x18\x06\x20\x01(\tR\x06addrTo\x12!\n\
    \x0cblock_height\x18\x07\x20\x01(\x04R\x0bblockHeight\x12\x14\n\x05index\
    \x18\x08\x20\x01(\x04R\x05index\"\xdb\x01\n\x11BlockchainHeaders\x12&\n\
    \x03btc\x18\x01\x20\x03(\x0b2\x14.bc.BlockchainHeaderR\x03btc\x12&\n\x03\
    eth\x18\x02\x20\x03(\x0b2\x14.bc.BlockchainHeaderR\x03eth\x12&\n\x03lsk\
    \x18\x03\x20\x03(\x0b2\x14.bc.BlockchainHeaderR\x03lsk\x12&\n\x03neo\x18\
    \x04\x20\x03(\x0b2\x14.bc.BlockchainHeaderR\x03neo\x12&\n\x03wav\x18\x05\
    \x20\x03(\x0b2\x14.bc.BlockchainHeaderR\x03wav\"\x81\t\n\x07BcBlock\x12\
    \x12\n\x04hash\x18\x01\x20\x01(\tR\x04hash\x12#\n\rprevious_hash\x18\x02\
    \x20\x01(\tR\x0cpreviousHash\x12\x18\n\x07version\x18\x03\x20\x01(\x04R\
    \x07version\x12%\n\x0eschema_version\x18\x04\x20\x01(\x04R\rschemaVersio\
    n\x12\x16\n\x06height\x18\x05\x20\x01(\x04R\x06height\x12\x14\n\x05miner\
    \x18\x06\x20\x01(\tR\x05miner\x12\x1e\n\ndifficulty\x18\x07\x20\x01(\tR\
    \ndifficulty\x12\x1c\n\ttimestamp\x18\x08\x20\x01(\x04R\ttimestamp\x12\
    \x1f\n\x0bmerkle_root\x18\t\x20\x01(\tR\nmerkleRoot\x12\x1d\n\nchain_roo\
    t\x18\n\x20\x01(\tR\tchainRoot\x12\x1a\n\x08distance\x18\x0b\x20\x01(\tR\
    \x08distance\x12%\n\x0etotal_distance\x18\x0c\x20\x01(\tR\rtotalDistance\
    \x12\x14\n\x05nonce\x18\r\x20\x01(\tR\x05nonce\x12\x1b\n\tnrg_grant\x18\
    \x0e\x20\x01(\x04R\x08nrgGrant\x12\x1f\n\x0btarget_hash\x18\x0f\x20\x01(\
    \tR\ntargetHash\x12#\n\rtarget_height\x18\x10\x20\x01(\x04R\x0ctargetHei\
    ght\x12!\n\x0ctarget_miner\x18\x11\x20\x01(\tR\x0btargetMiner\x12)\n\x10\
    target_signature\x18\x12\x20\x01(\tR\x0ftargetSignature\x12\x10\n\x03twn\
    \x18\x13\x20\x01(\x04R\x03twn\x12\x10\n\x03tws\x18\x14\x20\x03(\tR\x03tw\
    s\x12#\n\remblem_weight\x18\x15\x20\x01(\x04R\x0cemblemWeight\x125\n\x17\
    emblem_chain_block_hash\x18\x16\x20\x01(\tR\x14emblemChainBlockHash\x12A\
    \n\x1demblem_chain_fingerprint_root\x18\x17\x20\x01(\tR\x1aemblemChainFi\
    ngerprintRoot\x120\n\x14emblem_chain_address\x18\x18\x20\x01(\tR\x12embl\
    emChainAddress\x12\x19\n\x08tx_count\x18\x19\x20\x01(\x04R\x07txCount\
    \x12!\n\x03txs\x18\x1a\x20\x03(\x0b2\x0f.bc.TransactionR\x03txs\x12\x1e\
    \n\x0btx_fee_base\x18\x1b\x20\x01(\x04R\ttxFeeBase\x121\n\x15tx_distance\
    _sum_limit\x18\x1c\x20\x01(\x04R\x12txDistanceSumLimit\x128\n\x18blockch\
    ain_headers_count\x18\x1d\x20\x01(\x04R\x16blockchainHeadersCount\x12D\n\
    \x12blockchain_headers\x18\x1e\x20\x01(\x0b2\x15.bc.BlockchainHeadersR\
    \x11blockchainHeaders\x12@\n\x1cblockchain_fingerprints_root\x18\x1f\x20\
    \x01(\tR\x1ablockchainFingerprintsRoot\"J\n\x08OutPoint\x12\x14\n\x05val\
    ue\x18\x01\x20\x01(\x0cR\x05value\x12\x12\n\x04hash\x18\x02\x20\x01(\tR\
    \x04hash\x12\x14\n\x05index\x18\x03\x20\x01(\x04R\x05index\"\xa5\x02\n\
    \x0bTransaction\x12\x18\n\x07version\x18\x01\x20\x01(\x04R\x07version\
    \x12\x14\n\x05nonce\x18\x02\x20\x01(\tR\x05nonce\x12\x12\n\x04hash\x18\
    \x03\x20\x01(\tR\x04hash\x12\x1a\n\x08overline\x18\x04\x20\x01(\tR\x08ov\
    erline\x12\x1b\n\tnin_count\x18\x05\x20\x01(\x04R\x08ninCount\x12\x1d\n\
    \nnout_count\x18\x06\x20\x01(\x04R\tnoutCount\x12,\n\x06inputs\x18\x07\
    \x20\x03(\x0b2\x14.bc.TransactionInputR\x06inputs\x12/\n\x07outputs\x18\
    \x08\x20\x03(\x0b2\x15.bc.TransactionOutputR\x07outputs\x12\x1b\n\tlock_\
    time\x18\t\x20\x01(\rR\x08lockTime\"\x85\x01\n\x10TransactionInput\x12)\
    \n\tout_point\x18\x01\x20\x01(\x0b2\x0c.bc.OutPointR\x08outPoint\x12#\n\
    \rscript_length\x18\x02\x20\x01(\rR\x0cscriptLength\x12!\n\x0cinput_scri\
    pt\x18\x03\x20\x01(\x0cR\x0binputScript\"\x87\x01\n\x11TransactionOutput\
    \x12\x14\n\x05value\x18\x01\x20\x01(\x0cR\x05value\x12\x12\n\x04unit\x18\
    \x02\x20\x01(\x0cR\x04unit\x12#\n\rscript_length\x18\x03\x20\x01(\rR\x0c\
    scriptLength\x12#\n\routput_script\x18\x04\x20\x01(\x0cR\x0coutputScript\
    \"\xd0\x02\n\x10BlockchainHeader\x12\x1e\n\nblockchain\x18\x01\x20\x01(\
    \tR\nblockchain\x12\x12\n\x04hash\x18\x02\x20\x01(\tR\x04hash\x12#\n\rpr\
    evious_hash\x18\x03\x20\x01(\tR\x0cpreviousHash\x12\x1c\n\ttimestamp\x18\
    \x04\x20\x01(\x04R\ttimestamp\x12\x16\n\x06height\x18\x05\x20\x01(\x04R\
    \x06height\x12\x1f\n\x0bmerkle_root\x18\x06\x20\x01(\tR\nmerkleRoot\x12V\
    \n(blockchain_confirmations_in_parent_count\x18\x07\x20\x01(\x04R$blockc\
    hainConfirmationsInParentCount\x124\n\nmarked_txs\x18\x08\x20\x03(\x0b2\
    \x15.bc.MarkedTransactionR\tmarkedTxsb\x06proto3\
";

static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
    lock: ::protobuf::lazy::ONCE_INIT,
    ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    unsafe {
        file_descriptor_proto_lazy.get(|| {
            parse_descriptor_proto()
        })
    }
}
