diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e956aa..325eb8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +_July 23, 2020_ + +## v0.7.2 + +### IMPROVEMENTS: + +- [\#138](https://github.com/tendermint/rust-abci/pull/138): dependencies upgrades (protobuf to 2.16.2, tokio to 0.2, bytes to 0.5) + _June 30, 2020_ ## v0.7.1 diff --git a/Cargo.toml b/Cargo.toml index d23b2ed..a846b0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "abci" -version = "0.7.1" +version = "0.7.2" authors = ["Adrian Brink ", "Jackson Lewis ", "Dave Bryson", "Tomas Tauber"] edition = "2018" license = "MIT/Apache-2.0" @@ -12,14 +12,15 @@ readme = "README.md" include = ["src/**/*", "Cargo.toml"] [dependencies] -bytes = "0.4" -protobuf = "= 2.15.1" +bytes = "0.5" +protobuf = "= 2.16.2" byteorder = "1.3.4" integer-encoding = "1.1.5" log = "0.4.8" env_logger = "0.7.1" -tokio = { version = "0.1", default-features = false, features = ["codec", "io", "tcp", "rt-full"] } +tokio = { version = "0.2", features = ["tcp", "rt-core", "io-driver", "sync"] } +tokio-util = { version = "0.3.1", features = ["codec"] } futures = "0.3" [build-dependencies] -protobuf-codegen-pure = "= 2.15.1" +protobuf-codegen-pure = "= 2.16.2" diff --git a/Makefile b/Makefile index 6b4859e..768a2be 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Origin -version_branch = v0.33.5 +version_branch = v0.33.6 tendermint = https://raw.githubusercontent.com/tendermint/tendermint/$(version_branch) # Outputs diff --git a/README.md b/README.md index cc5dc92..3401864 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ To use this library to build your own ABCI apps in Rust you have to include the ```toml [dependencies] -abci = "0.7.1" +abci = "0.7.2" ``` ### Development @@ -65,6 +65,7 @@ For a real life example of an ABCI application you can checkout [Cosmos SDK](htt | Tendermint | Rust-abci | | ---------- | :-------: | +| 0.33.6 | 0.7.2 | | 0.33.5 | 0.7.1 | | 0.33.1 | 0.7.0 | | 0.32.9 | 0.6.5 | diff --git a/src/codec.rs b/src/codec.rs index b40ad75..edf1abb 100644 --- a/src/codec.rs +++ b/src/codec.rs @@ -1,9 +1,7 @@ -use std::error::Error; - -use bytes::{BufMut, BytesMut}; +use bytes::{buf::BufMutExt, BufMut, BytesMut}; use integer_encoding::VarInt; -use protobuf::Message; -use tokio::codec::{Decoder, Encoder}; +use protobuf::{Message, ProtobufError}; +use tokio_util::codec::{Decoder, Encoder}; use crate::messages::abci::*; @@ -18,9 +16,9 @@ impl ABCICodec { impl Decoder for ABCICodec { type Item = Request; - type Error = Box; + type Error = ProtobufError; - fn decode(&mut self, buf: &mut BytesMut) -> Result, Box> { + fn decode(&mut self, buf: &mut BytesMut) -> Result, ProtobufError> { let length = buf.len(); if length == 0 { return Ok(None); @@ -30,16 +28,15 @@ impl Decoder for ABCICodec { return Ok(None); } let request = protobuf::parse_from_bytes(&buf[varint.1..(varint.0 as usize + varint.1)])?; - buf.split_to(varint.0 as usize + varint.1); + let _ = buf.split_to(varint.0 as usize + varint.1); Ok(Some(request)) } } -impl Encoder for ABCICodec { - type Item = Response; - type Error = Box; +impl Encoder for ABCICodec { + type Error = ProtobufError; - fn encode(&mut self, msg: Response, buf: &mut BytesMut) -> Result<(), Box> { + fn encode(&mut self, msg: Response, buf: &mut BytesMut) -> Result<(), ProtobufError> { let msg_len = msg.compute_size(); let varint = i64::encode_var_vec(i64::from(msg_len)); @@ -49,7 +46,7 @@ impl Encoder for ABCICodec { buf.reserve(needed); } - buf.put(&varint); + buf.put(varint.as_ref()); msg.write_to_writer(&mut buf.writer())?; trace!("Encode response! {:?}", &buf[..]); Ok(()) @@ -59,9 +56,10 @@ impl Encoder for ABCICodec { #[cfg(test)] mod tests { use super::*; + use std::error::Error; fn setup_echo_request_buf() -> Result> { - let buf = &mut BytesMut::new(); + let mut buf = BytesMut::new(); let mut r = Request::new(); let mut echo = RequestEcho::new(); @@ -70,16 +68,16 @@ mod tests { let msg_len = r.compute_size(); let varint = i64::encode_var_vec(msg_len as i64); - buf.put(varint); - r.write_to_writer(&mut buf.writer())?; + buf.put(varint.as_ref()); + r.write_to_writer(&mut (&mut buf).writer())?; trace!("Encode response! {:?}", &buf[..]); - Ok(buf.take()) + Ok(buf) } fn setup_echo_large_request_buf() -> Result> { - let buf = &mut BytesMut::new(); + let mut buf = BytesMut::new(); let mut r = Request::new(); let mut echo = RequestEcho::new(); @@ -96,12 +94,12 @@ mod tests { buf.reserve(needed); } - buf.put(varint); - r.write_to_writer(&mut buf.writer())?; + buf.put(varint.as_ref()); + r.write_to_writer(&mut (&mut buf).writer())?; trace!("Encode response! {:?}", &buf[..]); - Ok(buf.take()) + Ok(buf) } #[test] diff --git a/src/messages/abci.rs b/src/messages/abci.rs index e8aeae8..83c32e9 100644 --- a/src/messages/abci.rs +++ b/src/messages/abci.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 2.15.1. Do not edit +// This file is generated by rust-protobuf 2.16.2. Do not edit // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -15,17 +15,13 @@ #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] -#![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] //! Generated file from `abci.proto` -use protobuf::Message as Message_imported_for_functions; -use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; - /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_15_1; +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_16_2; #[derive(PartialEq,Clone,Default)] pub struct Request { @@ -68,7 +64,7 @@ impl Request { pub fn get_echo(&self) -> &RequestEcho { match self.value { ::std::option::Option::Some(Request_oneof_value::echo(ref v)) => v, - _ => RequestEcho::default_instance(), + _ => ::default_instance(), } } pub fn clear_echo(&mut self) { @@ -117,7 +113,7 @@ impl Request { pub fn get_flush(&self) -> &RequestFlush { match self.value { ::std::option::Option::Some(Request_oneof_value::flush(ref v)) => v, - _ => RequestFlush::default_instance(), + _ => ::default_instance(), } } pub fn clear_flush(&mut self) { @@ -166,7 +162,7 @@ impl Request { pub fn get_info(&self) -> &RequestInfo { match self.value { ::std::option::Option::Some(Request_oneof_value::info(ref v)) => v, - _ => RequestInfo::default_instance(), + _ => ::default_instance(), } } pub fn clear_info(&mut self) { @@ -215,7 +211,7 @@ impl Request { pub fn get_set_option(&self) -> &RequestSetOption { match self.value { ::std::option::Option::Some(Request_oneof_value::set_option(ref v)) => v, - _ => RequestSetOption::default_instance(), + _ => ::default_instance(), } } pub fn clear_set_option(&mut self) { @@ -264,7 +260,7 @@ impl Request { pub fn get_init_chain(&self) -> &RequestInitChain { match self.value { ::std::option::Option::Some(Request_oneof_value::init_chain(ref v)) => v, - _ => RequestInitChain::default_instance(), + _ => ::default_instance(), } } pub fn clear_init_chain(&mut self) { @@ -313,7 +309,7 @@ impl Request { pub fn get_query(&self) -> &RequestQuery { match self.value { ::std::option::Option::Some(Request_oneof_value::query(ref v)) => v, - _ => RequestQuery::default_instance(), + _ => ::default_instance(), } } pub fn clear_query(&mut self) { @@ -362,7 +358,7 @@ impl Request { pub fn get_begin_block(&self) -> &RequestBeginBlock { match self.value { ::std::option::Option::Some(Request_oneof_value::begin_block(ref v)) => v, - _ => RequestBeginBlock::default_instance(), + _ => ::default_instance(), } } pub fn clear_begin_block(&mut self) { @@ -411,7 +407,7 @@ impl Request { pub fn get_check_tx(&self) -> &RequestCheckTx { match self.value { ::std::option::Option::Some(Request_oneof_value::check_tx(ref v)) => v, - _ => RequestCheckTx::default_instance(), + _ => ::default_instance(), } } pub fn clear_check_tx(&mut self) { @@ -460,7 +456,7 @@ impl Request { pub fn get_deliver_tx(&self) -> &RequestDeliverTx { match self.value { ::std::option::Option::Some(Request_oneof_value::deliver_tx(ref v)) => v, - _ => RequestDeliverTx::default_instance(), + _ => ::default_instance(), } } pub fn clear_deliver_tx(&mut self) { @@ -509,7 +505,7 @@ impl Request { pub fn get_end_block(&self) -> &RequestEndBlock { match self.value { ::std::option::Option::Some(Request_oneof_value::end_block(ref v)) => v, - _ => RequestEndBlock::default_instance(), + _ => ::default_instance(), } } pub fn clear_end_block(&mut self) { @@ -558,7 +554,7 @@ impl Request { pub fn get_commit(&self) -> &RequestCommit { match self.value { ::std::option::Option::Some(Request_oneof_value::commit(ref v)) => v, - _ => RequestCommit::default_instance(), + _ => ::default_instance(), } } pub fn clear_commit(&mut self) { @@ -892,79 +888,75 @@ impl ::protobuf::Message for Request { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestEcho>( - "echo", - Request::has_echo, - Request::get_echo, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestFlush>( - "flush", - Request::has_flush, - Request::get_flush, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestInfo>( - "info", - Request::has_info, - Request::get_info, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestSetOption>( - "set_option", - Request::has_set_option, - Request::get_set_option, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestInitChain>( - "init_chain", - Request::has_init_chain, - Request::get_init_chain, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestQuery>( - "query", - Request::has_query, - Request::get_query, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestBeginBlock>( - "begin_block", - Request::has_begin_block, - Request::get_begin_block, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestCheckTx>( - "check_tx", - Request::has_check_tx, - Request::get_check_tx, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestDeliverTx>( - "deliver_tx", - Request::has_deliver_tx, - Request::get_deliver_tx, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestEndBlock>( - "end_block", - Request::has_end_block, - Request::get_end_block, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestCommit>( - "commit", - Request::has_commit, - Request::get_commit, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Request", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestEcho>( + "echo", + Request::has_echo, + Request::get_echo, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestFlush>( + "flush", + Request::has_flush, + Request::get_flush, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestInfo>( + "info", + Request::has_info, + Request::get_info, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestSetOption>( + "set_option", + Request::has_set_option, + Request::get_set_option, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestInitChain>( + "init_chain", + Request::has_init_chain, + Request::get_init_chain, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestQuery>( + "query", + Request::has_query, + Request::get_query, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestBeginBlock>( + "begin_block", + Request::has_begin_block, + Request::get_begin_block, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestCheckTx>( + "check_tx", + Request::has_check_tx, + Request::get_check_tx, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestDeliverTx>( + "deliver_tx", + Request::has_deliver_tx, + Request::get_deliver_tx, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestEndBlock>( + "end_block", + Request::has_end_block, + Request::get_end_block, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, RequestCommit>( + "commit", + Request::has_commit, + Request::get_commit, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Request", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Request { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Request::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Request::new) } } @@ -1115,29 +1107,25 @@ impl ::protobuf::Message for RequestEcho { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "message", - |m: &RequestEcho| { &m.message }, - |m: &mut RequestEcho| { &mut m.message }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestEcho", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "message", + |m: &RequestEcho| { &m.message }, + |m: &mut RequestEcho| { &mut m.message }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestEcho", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestEcho { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestEcho::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestEcho::new) } } @@ -1241,24 +1229,20 @@ impl ::protobuf::Message for RequestFlush { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let fields = ::std::vec::Vec::new(); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestFlush", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let fields = ::std::vec::Vec::new(); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestFlush", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestFlush { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestFlush::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestFlush::new) } } @@ -1456,39 +1440,35 @@ impl ::protobuf::Message for RequestInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "version", - |m: &RequestInfo| { &m.version }, - |m: &mut RequestInfo| { &mut m.version }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "block_version", - |m: &RequestInfo| { &m.block_version }, - |m: &mut RequestInfo| { &mut m.block_version }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "p2p_version", - |m: &RequestInfo| { &m.p2p_version }, - |m: &mut RequestInfo| { &mut m.p2p_version }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestInfo", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "version", + |m: &RequestInfo| { &m.version }, + |m: &mut RequestInfo| { &mut m.version }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "block_version", + |m: &RequestInfo| { &m.block_version }, + |m: &mut RequestInfo| { &mut m.block_version }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "p2p_version", + |m: &RequestInfo| { &m.p2p_version }, + |m: &mut RequestInfo| { &mut m.p2p_version }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestInfo", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestInfo { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestInfo::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestInfo::new) } } @@ -1667,34 +1647,30 @@ impl ::protobuf::Message for RequestSetOption { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "key", - |m: &RequestSetOption| { &m.key }, - |m: &mut RequestSetOption| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &RequestSetOption| { &m.value }, - |m: &mut RequestSetOption| { &mut m.value }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestSetOption", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "key", + |m: &RequestSetOption| { &m.key }, + |m: &mut RequestSetOption| { &mut m.key }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "value", + |m: &RequestSetOption| { &m.value }, + |m: &mut RequestSetOption| { &mut m.value }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestSetOption", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestSetOption { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestSetOption::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestSetOption::new) } } @@ -1746,7 +1722,7 @@ impl RequestInitChain { pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp { - self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + self.time.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Timestamp as ::protobuf::Message>::default_instance()) } pub fn clear_time(&mut self) { self.time.clear(); @@ -1805,7 +1781,7 @@ impl RequestInitChain { pub fn get_consensus_params(&self) -> &ConsensusParams { - self.consensus_params.as_ref().unwrap_or_else(|| ConsensusParams::default_instance()) + self.consensus_params.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_consensus_params(&mut self) { self.consensus_params.clear(); @@ -2017,49 +1993,45 @@ impl ::protobuf::Message for RequestInitChain { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( - "time", - |m: &RequestInitChain| { &m.time }, - |m: &mut RequestInitChain| { &mut m.time }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "chain_id", - |m: &RequestInitChain| { &m.chain_id }, - |m: &mut RequestInitChain| { &mut m.chain_id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "consensus_params", - |m: &RequestInitChain| { &m.consensus_params }, - |m: &mut RequestInitChain| { &mut m.consensus_params }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "validators", - |m: &RequestInitChain| { &m.validators }, - |m: &mut RequestInitChain| { &mut m.validators }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "app_state_bytes", - |m: &RequestInitChain| { &m.app_state_bytes }, - |m: &mut RequestInitChain| { &mut m.app_state_bytes }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestInitChain", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "time", + |m: &RequestInitChain| { &m.time }, + |m: &mut RequestInitChain| { &mut m.time }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "chain_id", + |m: &RequestInitChain| { &m.chain_id }, + |m: &mut RequestInitChain| { &mut m.chain_id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "consensus_params", + |m: &RequestInitChain| { &m.consensus_params }, + |m: &mut RequestInitChain| { &mut m.consensus_params }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "validators", + |m: &RequestInitChain| { &m.validators }, + |m: &mut RequestInitChain| { &mut m.validators }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "app_state_bytes", + |m: &RequestInitChain| { &m.app_state_bytes }, + |m: &mut RequestInitChain| { &mut m.app_state_bytes }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestInitChain", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestInitChain { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestInitChain::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestInitChain::new) } } @@ -2298,44 +2270,40 @@ impl ::protobuf::Message for RequestQuery { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "data", - |m: &RequestQuery| { &m.data }, - |m: &mut RequestQuery| { &mut m.data }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "path", - |m: &RequestQuery| { &m.path }, - |m: &mut RequestQuery| { &mut m.path }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "height", - |m: &RequestQuery| { &m.height }, - |m: &mut RequestQuery| { &mut m.height }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "prove", - |m: &RequestQuery| { &m.prove }, - |m: &mut RequestQuery| { &mut m.prove }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestQuery", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "data", + |m: &RequestQuery| { &m.data }, + |m: &mut RequestQuery| { &mut m.data }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "path", + |m: &RequestQuery| { &m.path }, + |m: &mut RequestQuery| { &mut m.path }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "height", + |m: &RequestQuery| { &m.height }, + |m: &mut RequestQuery| { &mut m.height }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "prove", + |m: &RequestQuery| { &m.prove }, + |m: &mut RequestQuery| { &mut m.prove }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestQuery", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestQuery { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestQuery::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestQuery::new) } } @@ -2414,7 +2382,7 @@ impl RequestBeginBlock { pub fn get_header(&self) -> &Header { - self.header.as_ref().unwrap_or_else(|| Header::default_instance()) + self.header.as_ref().unwrap_or_else(||
::default_instance()) } pub fn clear_header(&mut self) { self.header.clear(); @@ -2447,7 +2415,7 @@ impl RequestBeginBlock { pub fn get_last_commit_info(&self) -> &LastCommitInfo { - self.last_commit_info.as_ref().unwrap_or_else(|| LastCommitInfo::default_instance()) + self.last_commit_info.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_last_commit_info(&mut self) { self.last_commit_info.clear(); @@ -2624,44 +2592,40 @@ impl ::protobuf::Message for RequestBeginBlock { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "hash", - |m: &RequestBeginBlock| { &m.hash }, - |m: &mut RequestBeginBlock| { &mut m.hash }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage
>( - "header", - |m: &RequestBeginBlock| { &m.header }, - |m: &mut RequestBeginBlock| { &mut m.header }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "last_commit_info", - |m: &RequestBeginBlock| { &m.last_commit_info }, - |m: &mut RequestBeginBlock| { &mut m.last_commit_info }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "byzantine_validators", - |m: &RequestBeginBlock| { &m.byzantine_validators }, - |m: &mut RequestBeginBlock| { &mut m.byzantine_validators }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestBeginBlock", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "hash", + |m: &RequestBeginBlock| { &m.hash }, + |m: &mut RequestBeginBlock| { &mut m.hash }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage
>( + "header", + |m: &RequestBeginBlock| { &m.header }, + |m: &mut RequestBeginBlock| { &mut m.header }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "last_commit_info", + |m: &RequestBeginBlock| { &m.last_commit_info }, + |m: &mut RequestBeginBlock| { &mut m.last_commit_info }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "byzantine_validators", + |m: &RequestBeginBlock| { &m.byzantine_validators }, + |m: &mut RequestBeginBlock| { &mut m.byzantine_validators }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestBeginBlock", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestBeginBlock { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestBeginBlock::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestBeginBlock::new) } } @@ -2793,7 +2757,7 @@ impl ::protobuf::Message for RequestCheckTx { os.write_bytes(1, &self.tx)?; } if self.field_type != CheckTxType::New { - os.write_enum(2, self.field_type.value())?; + os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.field_type))?; } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) @@ -2830,34 +2794,30 @@ impl ::protobuf::Message for RequestCheckTx { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "tx", - |m: &RequestCheckTx| { &m.tx }, - |m: &mut RequestCheckTx| { &mut m.tx }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "type", - |m: &RequestCheckTx| { &m.field_type }, - |m: &mut RequestCheckTx| { &mut m.field_type }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestCheckTx", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "tx", + |m: &RequestCheckTx| { &m.tx }, + |m: &mut RequestCheckTx| { &mut m.tx }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "type", + |m: &RequestCheckTx| { &m.field_type }, + |m: &mut RequestCheckTx| { &mut m.field_type }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestCheckTx", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestCheckTx { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestCheckTx::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestCheckTx::new) } } @@ -2999,29 +2959,25 @@ impl ::protobuf::Message for RequestDeliverTx { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "tx", - |m: &RequestDeliverTx| { &m.tx }, - |m: &mut RequestDeliverTx| { &mut m.tx }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestDeliverTx", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "tx", + |m: &RequestDeliverTx| { &m.tx }, + |m: &mut RequestDeliverTx| { &mut m.tx }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestDeliverTx", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestDeliverTx { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestDeliverTx::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestDeliverTx::new) } } @@ -3155,29 +3111,25 @@ impl ::protobuf::Message for RequestEndBlock { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "height", - |m: &RequestEndBlock| { &m.height }, - |m: &mut RequestEndBlock| { &mut m.height }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestEndBlock", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "height", + |m: &RequestEndBlock| { &m.height }, + |m: &mut RequestEndBlock| { &mut m.height }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestEndBlock", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestEndBlock { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestEndBlock::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestEndBlock::new) } } @@ -3281,24 +3233,20 @@ impl ::protobuf::Message for RequestCommit { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let fields = ::std::vec::Vec::new(); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RequestCommit", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let fields = ::std::vec::Vec::new(); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RequestCommit", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static RequestCommit { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(RequestCommit::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RequestCommit::new) } } @@ -3362,7 +3310,7 @@ impl Response { pub fn get_exception(&self) -> &ResponseException { match self.value { ::std::option::Option::Some(Response_oneof_value::exception(ref v)) => v, - _ => ResponseException::default_instance(), + _ => ::default_instance(), } } pub fn clear_exception(&mut self) { @@ -3411,7 +3359,7 @@ impl Response { pub fn get_echo(&self) -> &ResponseEcho { match self.value { ::std::option::Option::Some(Response_oneof_value::echo(ref v)) => v, - _ => ResponseEcho::default_instance(), + _ => ::default_instance(), } } pub fn clear_echo(&mut self) { @@ -3460,7 +3408,7 @@ impl Response { pub fn get_flush(&self) -> &ResponseFlush { match self.value { ::std::option::Option::Some(Response_oneof_value::flush(ref v)) => v, - _ => ResponseFlush::default_instance(), + _ => ::default_instance(), } } pub fn clear_flush(&mut self) { @@ -3509,7 +3457,7 @@ impl Response { pub fn get_info(&self) -> &ResponseInfo { match self.value { ::std::option::Option::Some(Response_oneof_value::info(ref v)) => v, - _ => ResponseInfo::default_instance(), + _ => ::default_instance(), } } pub fn clear_info(&mut self) { @@ -3558,7 +3506,7 @@ impl Response { pub fn get_set_option(&self) -> &ResponseSetOption { match self.value { ::std::option::Option::Some(Response_oneof_value::set_option(ref v)) => v, - _ => ResponseSetOption::default_instance(), + _ => ::default_instance(), } } pub fn clear_set_option(&mut self) { @@ -3607,7 +3555,7 @@ impl Response { pub fn get_init_chain(&self) -> &ResponseInitChain { match self.value { ::std::option::Option::Some(Response_oneof_value::init_chain(ref v)) => v, - _ => ResponseInitChain::default_instance(), + _ => ::default_instance(), } } pub fn clear_init_chain(&mut self) { @@ -3656,7 +3604,7 @@ impl Response { pub fn get_query(&self) -> &ResponseQuery { match self.value { ::std::option::Option::Some(Response_oneof_value::query(ref v)) => v, - _ => ResponseQuery::default_instance(), + _ => ::default_instance(), } } pub fn clear_query(&mut self) { @@ -3705,7 +3653,7 @@ impl Response { pub fn get_begin_block(&self) -> &ResponseBeginBlock { match self.value { ::std::option::Option::Some(Response_oneof_value::begin_block(ref v)) => v, - _ => ResponseBeginBlock::default_instance(), + _ => ::default_instance(), } } pub fn clear_begin_block(&mut self) { @@ -3754,7 +3702,7 @@ impl Response { pub fn get_check_tx(&self) -> &ResponseCheckTx { match self.value { ::std::option::Option::Some(Response_oneof_value::check_tx(ref v)) => v, - _ => ResponseCheckTx::default_instance(), + _ => ::default_instance(), } } pub fn clear_check_tx(&mut self) { @@ -3803,7 +3751,7 @@ impl Response { pub fn get_deliver_tx(&self) -> &ResponseDeliverTx { match self.value { ::std::option::Option::Some(Response_oneof_value::deliver_tx(ref v)) => v, - _ => ResponseDeliverTx::default_instance(), + _ => ::default_instance(), } } pub fn clear_deliver_tx(&mut self) { @@ -3852,7 +3800,7 @@ impl Response { pub fn get_end_block(&self) -> &ResponseEndBlock { match self.value { ::std::option::Option::Some(Response_oneof_value::end_block(ref v)) => v, - _ => ResponseEndBlock::default_instance(), + _ => ::default_instance(), } } pub fn clear_end_block(&mut self) { @@ -3901,7 +3849,7 @@ impl Response { pub fn get_commit(&self) -> &ResponseCommit { match self.value { ::std::option::Option::Some(Response_oneof_value::commit(ref v)) => v, - _ => ResponseCommit::default_instance(), + _ => ::default_instance(), } } pub fn clear_commit(&mut self) { @@ -4255,84 +4203,80 @@ impl ::protobuf::Message for Response { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseException>( - "exception", - Response::has_exception, - Response::get_exception, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseEcho>( - "echo", - Response::has_echo, - Response::get_echo, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseFlush>( - "flush", - Response::has_flush, - Response::get_flush, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseInfo>( - "info", - Response::has_info, - Response::get_info, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseSetOption>( - "set_option", - Response::has_set_option, - Response::get_set_option, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseInitChain>( - "init_chain", - Response::has_init_chain, - Response::get_init_chain, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseQuery>( - "query", - Response::has_query, - Response::get_query, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseBeginBlock>( - "begin_block", - Response::has_begin_block, - Response::get_begin_block, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseCheckTx>( - "check_tx", - Response::has_check_tx, - Response::get_check_tx, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseDeliverTx>( - "deliver_tx", - Response::has_deliver_tx, - Response::get_deliver_tx, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseEndBlock>( - "end_block", - Response::has_end_block, - Response::get_end_block, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseCommit>( - "commit", - Response::has_commit, - Response::get_commit, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Response", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseException>( + "exception", + Response::has_exception, + Response::get_exception, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseEcho>( + "echo", + Response::has_echo, + Response::get_echo, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseFlush>( + "flush", + Response::has_flush, + Response::get_flush, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseInfo>( + "info", + Response::has_info, + Response::get_info, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseSetOption>( + "set_option", + Response::has_set_option, + Response::get_set_option, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseInitChain>( + "init_chain", + Response::has_init_chain, + Response::get_init_chain, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseQuery>( + "query", + Response::has_query, + Response::get_query, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseBeginBlock>( + "begin_block", + Response::has_begin_block, + Response::get_begin_block, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseCheckTx>( + "check_tx", + Response::has_check_tx, + Response::get_check_tx, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseDeliverTx>( + "deliver_tx", + Response::has_deliver_tx, + Response::get_deliver_tx, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseEndBlock>( + "end_block", + Response::has_end_block, + Response::get_end_block, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ResponseCommit>( + "commit", + Response::has_commit, + Response::get_commit, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Response", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Response { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Response::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Response::new) } } @@ -4484,29 +4428,25 @@ impl ::protobuf::Message for ResponseException { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "error", - |m: &ResponseException| { &m.error }, - |m: &mut ResponseException| { &mut m.error }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseException", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "error", + |m: &ResponseException| { &m.error }, + |m: &mut ResponseException| { &mut m.error }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseException", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseException { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseException::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseException::new) } } @@ -4647,29 +4587,25 @@ impl ::protobuf::Message for ResponseEcho { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "message", - |m: &ResponseEcho| { &m.message }, - |m: &mut ResponseEcho| { &mut m.message }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseEcho", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "message", + |m: &ResponseEcho| { &m.message }, + |m: &mut ResponseEcho| { &mut m.message }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseEcho", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseEcho { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseEcho::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseEcho::new) } } @@ -4773,24 +4709,20 @@ impl ::protobuf::Message for ResponseFlush { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let fields = ::std::vec::Vec::new(); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseFlush", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let fields = ::std::vec::Vec::new(); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseFlush", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseFlush { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseFlush::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseFlush::new) } } @@ -5060,49 +4992,45 @@ impl ::protobuf::Message for ResponseInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "data", - |m: &ResponseInfo| { &m.data }, - |m: &mut ResponseInfo| { &mut m.data }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "version", - |m: &ResponseInfo| { &m.version }, - |m: &mut ResponseInfo| { &mut m.version }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "app_version", - |m: &ResponseInfo| { &m.app_version }, - |m: &mut ResponseInfo| { &mut m.app_version }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "last_block_height", - |m: &ResponseInfo| { &m.last_block_height }, - |m: &mut ResponseInfo| { &mut m.last_block_height }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "last_block_app_hash", - |m: &ResponseInfo| { &m.last_block_app_hash }, - |m: &mut ResponseInfo| { &mut m.last_block_app_hash }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseInfo", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "data", + |m: &ResponseInfo| { &m.data }, + |m: &mut ResponseInfo| { &mut m.data }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "version", + |m: &ResponseInfo| { &m.version }, + |m: &mut ResponseInfo| { &mut m.version }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "app_version", + |m: &ResponseInfo| { &m.app_version }, + |m: &mut ResponseInfo| { &mut m.app_version }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "last_block_height", + |m: &ResponseInfo| { &m.last_block_height }, + |m: &mut ResponseInfo| { &mut m.last_block_height }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "last_block_app_hash", + |m: &ResponseInfo| { &m.last_block_app_hash }, + |m: &mut ResponseInfo| { &mut m.last_block_app_hash }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseInfo", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseInfo { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseInfo::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseInfo::new) } } @@ -5312,39 +5240,35 @@ impl ::protobuf::Message for ResponseSetOption { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "code", - |m: &ResponseSetOption| { &m.code }, - |m: &mut ResponseSetOption| { &mut m.code }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "log", - |m: &ResponseSetOption| { &m.log }, - |m: &mut ResponseSetOption| { &mut m.log }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "info", - |m: &ResponseSetOption| { &m.info }, - |m: &mut ResponseSetOption| { &mut m.info }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseSetOption", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "code", + |m: &ResponseSetOption| { &m.code }, + |m: &mut ResponseSetOption| { &mut m.code }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "log", + |m: &ResponseSetOption| { &m.log }, + |m: &mut ResponseSetOption| { &mut m.log }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "info", + |m: &ResponseSetOption| { &m.info }, + |m: &mut ResponseSetOption| { &mut m.info }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseSetOption", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseSetOption { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseSetOption::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseSetOption::new) } } @@ -5394,7 +5318,7 @@ impl ResponseInitChain { pub fn get_consensus_params(&self) -> &ConsensusParams { - self.consensus_params.as_ref().unwrap_or_else(|| ConsensusParams::default_instance()) + self.consensus_params.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_consensus_params(&mut self) { self.consensus_params.clear(); @@ -5545,34 +5469,30 @@ impl ::protobuf::Message for ResponseInitChain { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "consensus_params", - |m: &ResponseInitChain| { &m.consensus_params }, - |m: &mut ResponseInitChain| { &mut m.consensus_params }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "validators", - |m: &ResponseInitChain| { &m.validators }, - |m: &mut ResponseInitChain| { &mut m.validators }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseInitChain", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "consensus_params", + |m: &ResponseInitChain| { &m.consensus_params }, + |m: &mut ResponseInitChain| { &mut m.consensus_params }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "validators", + |m: &ResponseInitChain| { &m.validators }, + |m: &mut ResponseInitChain| { &mut m.validators }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseInitChain", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseInitChain { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseInitChain::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseInitChain::new) } } @@ -5762,7 +5682,7 @@ impl ResponseQuery { pub fn get_proof(&self) -> &super::merkle::Proof { - self.proof.as_ref().unwrap_or_else(|| super::merkle::Proof::default_instance()) + self.proof.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_proof(&mut self) { self.proof.clear(); @@ -5996,69 +5916,65 @@ impl ::protobuf::Message for ResponseQuery { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "code", - |m: &ResponseQuery| { &m.code }, - |m: &mut ResponseQuery| { &mut m.code }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "log", - |m: &ResponseQuery| { &m.log }, - |m: &mut ResponseQuery| { &mut m.log }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "info", - |m: &ResponseQuery| { &m.info }, - |m: &mut ResponseQuery| { &mut m.info }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "index", - |m: &ResponseQuery| { &m.index }, - |m: &mut ResponseQuery| { &mut m.index }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "key", - |m: &ResponseQuery| { &m.key }, - |m: &mut ResponseQuery| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "value", - |m: &ResponseQuery| { &m.value }, - |m: &mut ResponseQuery| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "proof", - |m: &ResponseQuery| { &m.proof }, - |m: &mut ResponseQuery| { &mut m.proof }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "height", - |m: &ResponseQuery| { &m.height }, - |m: &mut ResponseQuery| { &mut m.height }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "codespace", - |m: &ResponseQuery| { &m.codespace }, - |m: &mut ResponseQuery| { &mut m.codespace }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseQuery", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "code", + |m: &ResponseQuery| { &m.code }, + |m: &mut ResponseQuery| { &mut m.code }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "log", + |m: &ResponseQuery| { &m.log }, + |m: &mut ResponseQuery| { &mut m.log }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "info", + |m: &ResponseQuery| { &m.info }, + |m: &mut ResponseQuery| { &mut m.info }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "index", + |m: &ResponseQuery| { &m.index }, + |m: &mut ResponseQuery| { &mut m.index }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "key", + |m: &ResponseQuery| { &m.key }, + |m: &mut ResponseQuery| { &mut m.key }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "value", + |m: &ResponseQuery| { &m.value }, + |m: &mut ResponseQuery| { &mut m.value }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "proof", + |m: &ResponseQuery| { &m.proof }, + |m: &mut ResponseQuery| { &mut m.proof }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "height", + |m: &ResponseQuery| { &m.height }, + |m: &mut ResponseQuery| { &mut m.height }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "codespace", + |m: &ResponseQuery| { &m.codespace }, + |m: &mut ResponseQuery| { &mut m.codespace }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseQuery", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseQuery { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseQuery::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseQuery::new) } } @@ -6214,29 +6130,25 @@ impl ::protobuf::Message for ResponseBeginBlock { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "events", - |m: &ResponseBeginBlock| { &m.events }, - |m: &mut ResponseBeginBlock| { &mut m.events }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseBeginBlock", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "events", + |m: &ResponseBeginBlock| { &m.events }, + |m: &mut ResponseBeginBlock| { &mut m.events }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseBeginBlock", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseBeginBlock { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseBeginBlock::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseBeginBlock::new) } } @@ -6615,64 +6527,60 @@ impl ::protobuf::Message for ResponseCheckTx { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "code", - |m: &ResponseCheckTx| { &m.code }, - |m: &mut ResponseCheckTx| { &mut m.code }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "data", - |m: &ResponseCheckTx| { &m.data }, - |m: &mut ResponseCheckTx| { &mut m.data }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "log", - |m: &ResponseCheckTx| { &m.log }, - |m: &mut ResponseCheckTx| { &mut m.log }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "info", - |m: &ResponseCheckTx| { &m.info }, - |m: &mut ResponseCheckTx| { &mut m.info }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "gas_wanted", - |m: &ResponseCheckTx| { &m.gas_wanted }, - |m: &mut ResponseCheckTx| { &mut m.gas_wanted }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "gas_used", - |m: &ResponseCheckTx| { &m.gas_used }, - |m: &mut ResponseCheckTx| { &mut m.gas_used }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "events", - |m: &ResponseCheckTx| { &m.events }, - |m: &mut ResponseCheckTx| { &mut m.events }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "codespace", - |m: &ResponseCheckTx| { &m.codespace }, - |m: &mut ResponseCheckTx| { &mut m.codespace }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseCheckTx", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "code", + |m: &ResponseCheckTx| { &m.code }, + |m: &mut ResponseCheckTx| { &mut m.code }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "data", + |m: &ResponseCheckTx| { &m.data }, + |m: &mut ResponseCheckTx| { &mut m.data }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "log", + |m: &ResponseCheckTx| { &m.log }, + |m: &mut ResponseCheckTx| { &mut m.log }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "info", + |m: &ResponseCheckTx| { &m.info }, + |m: &mut ResponseCheckTx| { &mut m.info }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "gas_wanted", + |m: &ResponseCheckTx| { &m.gas_wanted }, + |m: &mut ResponseCheckTx| { &mut m.gas_wanted }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "gas_used", + |m: &ResponseCheckTx| { &m.gas_used }, + |m: &mut ResponseCheckTx| { &mut m.gas_used }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "events", + |m: &ResponseCheckTx| { &m.events }, + |m: &mut ResponseCheckTx| { &mut m.events }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "codespace", + |m: &ResponseCheckTx| { &m.codespace }, + |m: &mut ResponseCheckTx| { &mut m.codespace }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseCheckTx", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseCheckTx { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseCheckTx::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseCheckTx::new) } } @@ -7058,64 +6966,60 @@ impl ::protobuf::Message for ResponseDeliverTx { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "code", - |m: &ResponseDeliverTx| { &m.code }, - |m: &mut ResponseDeliverTx| { &mut m.code }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "data", - |m: &ResponseDeliverTx| { &m.data }, - |m: &mut ResponseDeliverTx| { &mut m.data }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "log", - |m: &ResponseDeliverTx| { &m.log }, - |m: &mut ResponseDeliverTx| { &mut m.log }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "info", - |m: &ResponseDeliverTx| { &m.info }, - |m: &mut ResponseDeliverTx| { &mut m.info }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "gas_wanted", - |m: &ResponseDeliverTx| { &m.gas_wanted }, - |m: &mut ResponseDeliverTx| { &mut m.gas_wanted }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "gas_used", - |m: &ResponseDeliverTx| { &m.gas_used }, - |m: &mut ResponseDeliverTx| { &mut m.gas_used }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "events", - |m: &ResponseDeliverTx| { &m.events }, - |m: &mut ResponseDeliverTx| { &mut m.events }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "codespace", - |m: &ResponseDeliverTx| { &m.codespace }, - |m: &mut ResponseDeliverTx| { &mut m.codespace }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseDeliverTx", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( + "code", + |m: &ResponseDeliverTx| { &m.code }, + |m: &mut ResponseDeliverTx| { &mut m.code }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "data", + |m: &ResponseDeliverTx| { &m.data }, + |m: &mut ResponseDeliverTx| { &mut m.data }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "log", + |m: &ResponseDeliverTx| { &m.log }, + |m: &mut ResponseDeliverTx| { &mut m.log }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "info", + |m: &ResponseDeliverTx| { &m.info }, + |m: &mut ResponseDeliverTx| { &mut m.info }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "gas_wanted", + |m: &ResponseDeliverTx| { &m.gas_wanted }, + |m: &mut ResponseDeliverTx| { &mut m.gas_wanted }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "gas_used", + |m: &ResponseDeliverTx| { &m.gas_used }, + |m: &mut ResponseDeliverTx| { &mut m.gas_used }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "events", + |m: &ResponseDeliverTx| { &m.events }, + |m: &mut ResponseDeliverTx| { &mut m.events }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "codespace", + |m: &ResponseDeliverTx| { &m.codespace }, + |m: &mut ResponseDeliverTx| { &mut m.codespace }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseDeliverTx", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseDeliverTx { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseDeliverTx::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseDeliverTx::new) } } @@ -7196,7 +7100,7 @@ impl ResponseEndBlock { pub fn get_consensus_param_updates(&self) -> &ConsensusParams { - self.consensus_param_updates.as_ref().unwrap_or_else(|| ConsensusParams::default_instance()) + self.consensus_param_updates.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_consensus_param_updates(&mut self) { self.consensus_param_updates.clear(); @@ -7364,39 +7268,35 @@ impl ::protobuf::Message for ResponseEndBlock { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "validator_updates", - |m: &ResponseEndBlock| { &m.validator_updates }, - |m: &mut ResponseEndBlock| { &mut m.validator_updates }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "consensus_param_updates", - |m: &ResponseEndBlock| { &m.consensus_param_updates }, - |m: &mut ResponseEndBlock| { &mut m.consensus_param_updates }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "events", - |m: &ResponseEndBlock| { &m.events }, - |m: &mut ResponseEndBlock| { &mut m.events }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseEndBlock", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "validator_updates", + |m: &ResponseEndBlock| { &m.validator_updates }, + |m: &mut ResponseEndBlock| { &mut m.validator_updates }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "consensus_param_updates", + |m: &ResponseEndBlock| { &m.consensus_param_updates }, + |m: &mut ResponseEndBlock| { &mut m.consensus_param_updates }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "events", + |m: &ResponseEndBlock| { &m.events }, + |m: &mut ResponseEndBlock| { &mut m.events }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseEndBlock", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseEndBlock { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseEndBlock::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseEndBlock::new) } } @@ -7568,34 +7468,30 @@ impl ::protobuf::Message for ResponseCommit { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "data", - |m: &ResponseCommit| { &m.data }, - |m: &mut ResponseCommit| { &mut m.data }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "retain_height", - |m: &ResponseCommit| { &m.retain_height }, - |m: &mut ResponseCommit| { &mut m.retain_height }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ResponseCommit", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "data", + |m: &ResponseCommit| { &m.data }, + |m: &mut ResponseCommit| { &mut m.data }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "retain_height", + |m: &ResponseCommit| { &m.retain_height }, + |m: &mut ResponseCommit| { &mut m.retain_height }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ResponseCommit", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ResponseCommit { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ResponseCommit::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResponseCommit::new) } } @@ -7645,7 +7541,7 @@ impl ConsensusParams { pub fn get_block(&self) -> &BlockParams { - self.block.as_ref().unwrap_or_else(|| BlockParams::default_instance()) + self.block.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_block(&mut self) { self.block.clear(); @@ -7678,7 +7574,7 @@ impl ConsensusParams { pub fn get_evidence(&self) -> &EvidenceParams { - self.evidence.as_ref().unwrap_or_else(|| EvidenceParams::default_instance()) + self.evidence.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_evidence(&mut self) { self.evidence.clear(); @@ -7711,7 +7607,7 @@ impl ConsensusParams { pub fn get_validator(&self) -> &ValidatorParams { - self.validator.as_ref().unwrap_or_else(|| ValidatorParams::default_instance()) + self.validator.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_validator(&mut self) { self.validator.clear(); @@ -7854,39 +7750,35 @@ impl ::protobuf::Message for ConsensusParams { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "block", - |m: &ConsensusParams| { &m.block }, - |m: &mut ConsensusParams| { &mut m.block }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "evidence", - |m: &ConsensusParams| { &m.evidence }, - |m: &mut ConsensusParams| { &mut m.evidence }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "validator", - |m: &ConsensusParams| { &m.validator }, - |m: &mut ConsensusParams| { &mut m.validator }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ConsensusParams", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "block", + |m: &ConsensusParams| { &m.block }, + |m: &mut ConsensusParams| { &mut m.block }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "evidence", + |m: &ConsensusParams| { &m.evidence }, + |m: &mut ConsensusParams| { &mut m.evidence }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "validator", + |m: &ConsensusParams| { &m.validator }, + |m: &mut ConsensusParams| { &mut m.validator }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ConsensusParams", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ConsensusParams { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ConsensusParams::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ConsensusParams::new) } } @@ -8051,34 +7943,30 @@ impl ::protobuf::Message for BlockParams { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "max_bytes", - |m: &BlockParams| { &m.max_bytes }, - |m: &mut BlockParams| { &mut m.max_bytes }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "max_gas", - |m: &BlockParams| { &m.max_gas }, - |m: &mut BlockParams| { &mut m.max_gas }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "BlockParams", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "max_bytes", + |m: &BlockParams| { &m.max_bytes }, + |m: &mut BlockParams| { &mut m.max_bytes }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "max_gas", + |m: &BlockParams| { &m.max_gas }, + |m: &mut BlockParams| { &mut m.max_gas }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "BlockParams", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static BlockParams { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(BlockParams::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(BlockParams::new) } } @@ -8142,7 +8030,7 @@ impl EvidenceParams { pub fn get_max_age_duration(&self) -> &::protobuf::well_known_types::Duration { - self.max_age_duration.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Duration::default_instance()) + self.max_age_duration.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Duration as ::protobuf::Message>::default_instance()) } pub fn clear_max_age_duration(&mut self) { self.max_age_duration.clear(); @@ -8264,34 +8152,30 @@ impl ::protobuf::Message for EvidenceParams { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "max_age_num_blocks", - |m: &EvidenceParams| { &m.max_age_num_blocks }, - |m: &mut EvidenceParams| { &mut m.max_age_num_blocks }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>( - "max_age_duration", - |m: &EvidenceParams| { &m.max_age_duration }, - |m: &mut EvidenceParams| { &mut m.max_age_duration }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "EvidenceParams", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "max_age_num_blocks", + |m: &EvidenceParams| { &m.max_age_num_blocks }, + |m: &mut EvidenceParams| { &mut m.max_age_num_blocks }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Duration>>( + "max_age_duration", + |m: &EvidenceParams| { &m.max_age_duration }, + |m: &mut EvidenceParams| { &mut m.max_age_duration }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "EvidenceParams", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static EvidenceParams { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(EvidenceParams::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(EvidenceParams::new) } } @@ -8432,29 +8316,25 @@ impl ::protobuf::Message for ValidatorParams { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "pub_key_types", - |m: &ValidatorParams| { &m.pub_key_types }, - |m: &mut ValidatorParams| { &mut m.pub_key_types }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ValidatorParams", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "pub_key_types", + |m: &ValidatorParams| { &m.pub_key_types }, + |m: &mut ValidatorParams| { &mut m.pub_key_types }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ValidatorParams", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ValidatorParams { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ValidatorParams::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ValidatorParams::new) } } @@ -8631,34 +8511,30 @@ impl ::protobuf::Message for LastCommitInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( - "round", - |m: &LastCommitInfo| { &m.round }, - |m: &mut LastCommitInfo| { &mut m.round }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "votes", - |m: &LastCommitInfo| { &m.votes }, - |m: &mut LastCommitInfo| { &mut m.votes }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "LastCommitInfo", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "round", + |m: &LastCommitInfo| { &m.round }, + |m: &mut LastCommitInfo| { &mut m.round }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "votes", + |m: &LastCommitInfo| { &m.votes }, + |m: &mut LastCommitInfo| { &mut m.votes }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "LastCommitInfo", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static LastCommitInfo { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(LastCommitInfo::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(LastCommitInfo::new) } } @@ -8843,34 +8719,30 @@ impl ::protobuf::Message for Event { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &Event| { &m.field_type }, - |m: &mut Event| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "attributes", - |m: &Event| { &m.attributes }, - |m: &mut Event| { &mut m.attributes }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Event", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "type", + |m: &Event| { &m.field_type }, + |m: &mut Event| { &mut m.field_type }, + )); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "attributes", + |m: &Event| { &m.attributes }, + |m: &mut Event| { &mut m.attributes }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Event", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Event { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Event::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Event::new) } } @@ -8931,7 +8803,7 @@ impl Header { pub fn get_version(&self) -> &Version { - self.version.as_ref().unwrap_or_else(|| Version::default_instance()) + self.version.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_version(&mut self) { self.version.clear(); @@ -9005,7 +8877,7 @@ impl Header { pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp { - self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + self.time.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Timestamp as ::protobuf::Message>::default_instance()) } pub fn clear_time(&mut self) { self.time.clear(); @@ -9038,7 +8910,7 @@ impl Header { pub fn get_last_block_id(&self) -> &BlockID { - self.last_block_id.as_ref().unwrap_or_else(|| BlockID::default_instance()) + self.last_block_id.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_last_block_id(&mut self) { self.last_block_id.clear(); @@ -9518,94 +9390,90 @@ impl ::protobuf::Message for Header { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "version", - |m: &Header| { &m.version }, - |m: &mut Header| { &mut m.version }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "chain_id", - |m: &Header| { &m.chain_id }, - |m: &mut Header| { &mut m.chain_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "height", - |m: &Header| { &m.height }, - |m: &mut Header| { &mut m.height }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( - "time", - |m: &Header| { &m.time }, - |m: &mut Header| { &mut m.time }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "last_block_id", - |m: &Header| { &m.last_block_id }, - |m: &mut Header| { &mut m.last_block_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "last_commit_hash", - |m: &Header| { &m.last_commit_hash }, - |m: &mut Header| { &mut m.last_commit_hash }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "data_hash", - |m: &Header| { &m.data_hash }, - |m: &mut Header| { &mut m.data_hash }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "validators_hash", - |m: &Header| { &m.validators_hash }, - |m: &mut Header| { &mut m.validators_hash }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "next_validators_hash", - |m: &Header| { &m.next_validators_hash }, - |m: &mut Header| { &mut m.next_validators_hash }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "consensus_hash", - |m: &Header| { &m.consensus_hash }, - |m: &mut Header| { &mut m.consensus_hash }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "app_hash", - |m: &Header| { &m.app_hash }, - |m: &mut Header| { &mut m.app_hash }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "last_results_hash", - |m: &Header| { &m.last_results_hash }, - |m: &mut Header| { &mut m.last_results_hash }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "evidence_hash", - |m: &Header| { &m.evidence_hash }, - |m: &mut Header| { &mut m.evidence_hash }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "proposer_address", - |m: &Header| { &m.proposer_address }, - |m: &mut Header| { &mut m.proposer_address }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::
( - "Header", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "version", + |m: &Header| { &m.version }, + |m: &mut Header| { &mut m.version }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "chain_id", + |m: &Header| { &m.chain_id }, + |m: &mut Header| { &mut m.chain_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "height", + |m: &Header| { &m.height }, + |m: &mut Header| { &mut m.height }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "time", + |m: &Header| { &m.time }, + |m: &mut Header| { &mut m.time }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "last_block_id", + |m: &Header| { &m.last_block_id }, + |m: &mut Header| { &mut m.last_block_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "last_commit_hash", + |m: &Header| { &m.last_commit_hash }, + |m: &mut Header| { &mut m.last_commit_hash }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "data_hash", + |m: &Header| { &m.data_hash }, + |m: &mut Header| { &mut m.data_hash }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "validators_hash", + |m: &Header| { &m.validators_hash }, + |m: &mut Header| { &mut m.validators_hash }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "next_validators_hash", + |m: &Header| { &m.next_validators_hash }, + |m: &mut Header| { &mut m.next_validators_hash }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "consensus_hash", + |m: &Header| { &m.consensus_hash }, + |m: &mut Header| { &mut m.consensus_hash }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "app_hash", + |m: &Header| { &m.app_hash }, + |m: &mut Header| { &mut m.app_hash }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "last_results_hash", + |m: &Header| { &m.last_results_hash }, + |m: &mut Header| { &mut m.last_results_hash }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "evidence_hash", + |m: &Header| { &m.evidence_hash }, + |m: &mut Header| { &mut m.evidence_hash }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "proposer_address", + |m: &Header| { &m.proposer_address }, + |m: &mut Header| { &mut m.proposer_address }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::
( + "Header", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Header { - static mut instance: ::protobuf::lazy::Lazy
= ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Header::new) - } + static instance: ::protobuf::rt::LazyV2
= ::protobuf::rt::LazyV2::INIT; + instance.get(Header::new) } } @@ -9781,34 +9649,30 @@ impl ::protobuf::Message for Version { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "Block", - |m: &Version| { &m.Block }, - |m: &mut Version| { &mut m.Block }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "App", - |m: &Version| { &m.App }, - |m: &mut Version| { &mut m.App }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Version", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "Block", + |m: &Version| { &m.Block }, + |m: &mut Version| { &mut m.Block }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( + "App", + |m: &Version| { &m.App }, + |m: &mut Version| { &mut m.App }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Version", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Version { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Version::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Version::new) } } @@ -9883,7 +9747,7 @@ impl BlockID { pub fn get_parts_header(&self) -> &PartSetHeader { - self.parts_header.as_ref().unwrap_or_else(|| PartSetHeader::default_instance()) + self.parts_header.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_parts_header(&mut self) { self.parts_header.clear(); @@ -10001,34 +9865,30 @@ impl ::protobuf::Message for BlockID { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "hash", - |m: &BlockID| { &m.hash }, - |m: &mut BlockID| { &mut m.hash }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "parts_header", - |m: &BlockID| { &m.parts_header }, - |m: &mut BlockID| { &mut m.parts_header }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "BlockID", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "hash", + |m: &BlockID| { &m.hash }, + |m: &mut BlockID| { &mut m.hash }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "parts_header", + |m: &BlockID| { &m.parts_header }, + |m: &mut BlockID| { &mut m.parts_header }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "BlockID", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static BlockID { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(BlockID::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(BlockID::new) } } @@ -10199,34 +10059,30 @@ impl ::protobuf::Message for PartSetHeader { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( - "total", - |m: &PartSetHeader| { &m.total }, - |m: &mut PartSetHeader| { &mut m.total }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "hash", - |m: &PartSetHeader| { &m.hash }, - |m: &mut PartSetHeader| { &mut m.hash }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "PartSetHeader", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( + "total", + |m: &PartSetHeader| { &m.total }, + |m: &mut PartSetHeader| { &mut m.total }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "hash", + |m: &PartSetHeader| { &m.hash }, + |m: &mut PartSetHeader| { &mut m.hash }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "PartSetHeader", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static PartSetHeader { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PartSetHeader::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PartSetHeader::new) } } @@ -10397,34 +10253,30 @@ impl ::protobuf::Message for Validator { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "address", - |m: &Validator| { &m.address }, - |m: &mut Validator| { &mut m.address }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "power", - |m: &Validator| { &m.power }, - |m: &mut Validator| { &mut m.power }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Validator", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "address", + |m: &Validator| { &m.address }, + |m: &mut Validator| { &mut m.address }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "power", + |m: &Validator| { &m.power }, + |m: &mut Validator| { &mut m.power }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Validator", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Validator { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Validator::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Validator::new) } } @@ -10473,7 +10325,7 @@ impl ValidatorUpdate { pub fn get_pub_key(&self) -> &PubKey { - self.pub_key.as_ref().unwrap_or_else(|| PubKey::default_instance()) + self.pub_key.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_pub_key(&mut self) { self.pub_key.clear(); @@ -10610,34 +10462,30 @@ impl ::protobuf::Message for ValidatorUpdate { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "pub_key", - |m: &ValidatorUpdate| { &m.pub_key }, - |m: &mut ValidatorUpdate| { &mut m.pub_key }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "power", - |m: &ValidatorUpdate| { &m.power }, - |m: &mut ValidatorUpdate| { &mut m.power }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ValidatorUpdate", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "pub_key", + |m: &ValidatorUpdate| { &m.pub_key }, + |m: &mut ValidatorUpdate| { &mut m.pub_key }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "power", + |m: &ValidatorUpdate| { &m.power }, + |m: &mut ValidatorUpdate| { &mut m.power }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ValidatorUpdate", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ValidatorUpdate { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ValidatorUpdate::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ValidatorUpdate::new) } } @@ -10686,7 +10534,7 @@ impl VoteInfo { pub fn get_validator(&self) -> &Validator { - self.validator.as_ref().unwrap_or_else(|| Validator::default_instance()) + self.validator.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_validator(&mut self) { self.validator.clear(); @@ -10823,34 +10671,30 @@ impl ::protobuf::Message for VoteInfo { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "validator", - |m: &VoteInfo| { &m.validator }, - |m: &mut VoteInfo| { &mut m.validator }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "signed_last_block", - |m: &VoteInfo| { &m.signed_last_block }, - |m: &mut VoteInfo| { &mut m.signed_last_block }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "VoteInfo", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "validator", + |m: &VoteInfo| { &m.validator }, + |m: &mut VoteInfo| { &mut m.validator }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( + "signed_last_block", + |m: &VoteInfo| { &m.signed_last_block }, + |m: &mut VoteInfo| { &mut m.signed_last_block }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "VoteInfo", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static VoteInfo { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(VoteInfo::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(VoteInfo::new) } } @@ -11028,34 +10872,30 @@ impl ::protobuf::Message for PubKey { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &PubKey| { &m.field_type }, - |m: &mut PubKey| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "data", - |m: &PubKey| { &m.data }, - |m: &mut PubKey| { &mut m.data }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "PubKey", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "type", + |m: &PubKey| { &m.field_type }, + |m: &mut PubKey| { &mut m.field_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "data", + |m: &PubKey| { &m.data }, + |m: &mut PubKey| { &mut m.data }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "PubKey", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static PubKey { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(PubKey::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PubKey::new) } } @@ -11133,7 +10973,7 @@ impl Evidence { pub fn get_validator(&self) -> &Validator { - self.validator.as_ref().unwrap_or_else(|| Validator::default_instance()) + self.validator.as_ref().unwrap_or_else(|| ::default_instance()) } pub fn clear_validator(&mut self) { self.validator.clear(); @@ -11181,7 +11021,7 @@ impl Evidence { pub fn get_time(&self) -> &::protobuf::well_known_types::Timestamp { - self.time.as_ref().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::default_instance()) + self.time.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Timestamp as ::protobuf::Message>::default_instance()) } pub fn clear_time(&mut self) { self.time.clear(); @@ -11357,49 +11197,45 @@ impl ::protobuf::Message for Evidence { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &Evidence| { &m.field_type }, - |m: &mut Evidence| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "validator", - |m: &Evidence| { &m.validator }, - |m: &mut Evidence| { &mut m.validator }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "height", - |m: &Evidence| { &m.height }, - |m: &mut Evidence| { &mut m.height }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( - "time", - |m: &Evidence| { &m.time }, - |m: &mut Evidence| { &mut m.time }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "total_voting_power", - |m: &Evidence| { &m.total_voting_power }, - |m: &mut Evidence| { &mut m.total_voting_power }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Evidence", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "type", + |m: &Evidence| { &m.field_type }, + |m: &mut Evidence| { &mut m.field_type }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "validator", + |m: &Evidence| { &m.validator }, + |m: &mut Evidence| { &mut m.validator }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "height", + |m: &Evidence| { &m.height }, + |m: &mut Evidence| { &mut m.height }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>( + "time", + |m: &Evidence| { &m.time }, + |m: &mut Evidence| { &mut m.time }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "total_voting_power", + |m: &Evidence| { &m.total_voting_power }, + |m: &mut Evidence| { &mut m.total_voting_power }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Evidence", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Evidence { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Evidence::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Evidence::new) } } @@ -11454,12 +11290,10 @@ impl ::protobuf::ProtobufEnum for CheckTxType { } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("CheckTxType", file_descriptor_proto()) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("CheckTxType", file_descriptor_proto()) + }) } } @@ -11474,7 +11308,7 @@ impl ::std::default::Default for CheckTxType { impl ::protobuf::reflect::ProtobufValue for CheckTxType { fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor()) + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) } } @@ -11499,15 +11333,15 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x15\n\x0bp2p_version\x18\x03\x20\x01(\x04B\0:\0\"4\n\x10RequestSetOptio\ n\x12\r\n\x03key\x18\x01\x20\x01(\tB\0\x12\x0f\n\x05value\x18\x02\x20\ \x01(\tB\0:\0\"\xfd\x01\n\x10RequestInitChain\x122\n\x04time\x18\x01\x20\ - \x01(\x0b2\x1a.google.protobuf.TimestampB\x08\xc8\xde\x1f\0\x90\xdf\x1f\ - \x01\x12\x12\n\x08chain_id\x18\x02\x20\x01(\tB\0\x12B\n\x10consensus_par\ - ams\x18\x03\x20\x01(\x0b2&.tendermint.abci.types.ConsensusParamsB\0\x12@\ - \n\nvalidators\x18\x04\x20\x03(\x0b2&.tendermint.abci.types.ValidatorUpd\ - ateB\x04\xc8\xde\x1f\0\x12\x19\n\x0fapp_state_bytes\x18\x05\x20\x01(\x0c\ - B\0:\0\"S\n\x0cRequestQuery\x12\x0e\n\x04data\x18\x01\x20\x01(\x0cB\0\ - \x12\x0e\n\x04path\x18\x02\x20\x01(\tB\0\x12\x10\n\x06height\x18\x03\x20\ - \x01(\x03B\0\x12\x0f\n\x05prove\x18\x04\x20\x01(\x08B\0:\0\"\xe6\x01\n\ - \x11RequestBeginBlock\x12\x0e\n\x04hash\x18\x01\x20\x01(\x0cB\0\x123\n\ + \x01(\x0b2\x1a.google.protobuf.TimestampB\x08\x90\xdf\x1f\x01\xc8\xde\ + \x1f\0\x12\x12\n\x08chain_id\x18\x02\x20\x01(\tB\0\x12B\n\x10consensus_p\ + arams\x18\x03\x20\x01(\x0b2&.tendermint.abci.types.ConsensusParamsB\0\ + \x12@\n\nvalidators\x18\x04\x20\x03(\x0b2&.tendermint.abci.types.Validat\ + orUpdateB\x04\xc8\xde\x1f\0\x12\x19\n\x0fapp_state_bytes\x18\x05\x20\x01\ + (\x0cB\0:\0\"S\n\x0cRequestQuery\x12\x0e\n\x04data\x18\x01\x20\x01(\x0cB\ + \0\x12\x0e\n\x04path\x18\x02\x20\x01(\tB\0\x12\x10\n\x06height\x18\x03\ + \x20\x01(\x03B\0\x12\x0f\n\x05prove\x18\x04\x20\x01(\x08B\0:\0\"\xe6\x01\ + \n\x11RequestBeginBlock\x12\x0e\n\x04hash\x18\x01\x20\x01(\x0cB\0\x123\n\ \x06header\x18\x02\x20\x01(\x0b2\x1d.tendermint.abci.types.HeaderB\x04\ \xc8\xde\x1f\0\x12E\n\x10last_commit_info\x18\x03\x20\x01(\x0b2%.tenderm\ int.abci.types.LastCommitInfoB\x04\xc8\xde\x1f\0\x12C\n\x14byzantine_val\ @@ -11550,13 +11384,13 @@ static file_descriptor_proto_data: &'static [u8] = b"\ 2\x1f.tendermint.crypto.merkle.ProofB\0\x12\x10\n\x06height\x18\t\x20\ \x01(\x03B\0\x12\x13\n\tcodespace\x18\n\x20\x01(\tB\0:\0\"^\n\x12Respons\ eBeginBlock\x12F\n\x06events\x18\x01\x20\x03(\x0b2\x1c.tendermint.abci.t\ - ypes.EventB\x18\xc8\xde\x1f\0\xea\xde\x1f\x10events,omitempty:\0\"\xd9\ + ypes.EventB\x18\xea\xde\x1f\x10events,omitempty\xc8\xde\x1f\0:\0\"\xd9\ \x01\n\x0fResponseCheckTx\x12\x0e\n\x04code\x18\x01\x20\x01(\rB\0\x12\ \x0e\n\x04data\x18\x02\x20\x01(\x0cB\0\x12\r\n\x03log\x18\x03\x20\x01(\t\ B\0\x12\x0e\n\x04info\x18\x04\x20\x01(\tB\0\x12\x14\n\ngas_wanted\x18\ \x05\x20\x01(\x03B\0\x12\x12\n\x08gas_used\x18\x06\x20\x01(\x03B\0\x12F\ \n\x06events\x18\x07\x20\x03(\x0b2\x1c.tendermint.abci.types.EventB\x18\ - \xc8\xde\x1f\0\xea\xde\x1f\x10events,omitempty\x12\x13\n\tcodespace\x18\ + \xea\xde\x1f\x10events,omitempty\xc8\xde\x1f\0\x12\x13\n\tcodespace\x18\ \x08\x20\x01(\tB\0:\0\"\xdb\x01\n\x11ResponseDeliverTx\x12\x0e\n\x04code\ \x18\x01\x20\x01(\rB\0\x12\x0e\n\x04data\x18\x02\x20\x01(\x0cB\0\x12\r\n\ \x03log\x18\x03\x20\x01(\tB\0\x12\x0e\n\x04info\x18\x04\x20\x01(\tB\0\ @@ -11568,7 +11402,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ i.types.ValidatorUpdateB\x04\xc8\xde\x1f\0\x12I\n\x17consensus_param_upd\ ates\x18\x02\x20\x01(\x0b2&.tendermint.abci.types.ConsensusParamsB\0\x12\ F\n\x06events\x18\x03\x20\x03(\x0b2\x1c.tendermint.abci.types.EventB\x18\ - \xea\xde\x1f\x10events,omitempty\xc8\xde\x1f\0:\0\";\n\x0eResponseCommit\ + \xc8\xde\x1f\0\xea\xde\x1f\x10events,omitempty:\0\";\n\x0eResponseCommit\ \x12\x0e\n\x04data\x18\x02\x20\x01(\x0cB\0\x12\x17\n\rretain_height\x18\ \x03\x20\x01(\x03B\0:\0\"\xc0\x01\n\x0fConsensusParams\x123\n\x05block\ \x18\x01\x20\x01(\x0b2\".tendermint.abci.types.BlockParamsB\0\x129\n\x08\ @@ -11578,7 +11412,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x03B\0\x12\x11\n\x07max_gas\x18\x02\x20\x01(\x03B\0:\0\"o\n\x0eEvidence\ Params\x12\x1c\n\x12max_age_num_blocks\x18\x01\x20\x01(\x03B\0\x12=\n\ \x10max_age_duration\x18\x02\x20\x01(\x0b2\x19.google.protobuf.DurationB\ - \x08\x98\xdf\x1f\x01\xc8\xde\x1f\0:\0\",\n\x0fValidatorParams\x12\x17\n\ + \x08\xc8\xde\x1f\0\x98\xdf\x1f\x01:\0\",\n\x0fValidatorParams\x12\x17\n\ \rpub_key_types\x18\x01\x20\x03(\tB\0:\0\"Y\n\x0eLastCommitInfo\x12\x0f\ \n\x05round\x18\x01\x20\x01(\x05B\0\x124\n\x05votes\x18\x02\x20\x03(\x0b\ 2\x1f.tendermint.abci.types.VoteInfoB\x04\xc8\xde\x1f\0:\0\"e\n\x05Event\ @@ -11588,16 +11422,16 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x01\x20\x01(\x0b2\x1e.tendermint.abci.types.VersionB\x04\xc8\xde\x1f\0\ \x12\x1d\n\x08chain_id\x18\x02\x20\x01(\tB\x0b\xe2\xde\x1f\x07ChainID\ \x12\x10\n\x06height\x18\x03\x20\x01(\x03B\0\x122\n\x04time\x18\x04\x20\ - \x01(\x0b2\x1a.google.protobuf.TimestampB\x08\x90\xdf\x1f\x01\xc8\xde\ - \x1f\0\x12;\n\rlast_block_id\x18\x05\x20\x01(\x0b2\x1e.tendermint.abci.t\ - ypes.BlockIDB\x04\xc8\xde\x1f\0\x12\x1a\n\x10last_commit_hash\x18\x06\ - \x20\x01(\x0cB\0\x12\x13\n\tdata_hash\x18\x07\x20\x01(\x0cB\0\x12\x19\n\ - \x0fvalidators_hash\x18\x08\x20\x01(\x0cB\0\x12\x1e\n\x14next_validators\ - _hash\x18\t\x20\x01(\x0cB\0\x12\x18\n\x0econsensus_hash\x18\n\x20\x01(\ - \x0cB\0\x12\x12\n\x08app_hash\x18\x0b\x20\x01(\x0cB\0\x12\x1b\n\x11last_\ - results_hash\x18\x0c\x20\x01(\x0cB\0\x12\x17\n\revidence_hash\x18\r\x20\ - \x01(\x0cB\0\x12\x1a\n\x10proposer_address\x18\x0e\x20\x01(\x0cB\0:\0\"+\ - \n\x07Version\x12\x0f\n\x05Block\x18\x01\x20\x01(\x04B\0\x12\r\n\x03App\ + \x01(\x0b2\x1a.google.protobuf.TimestampB\x08\xc8\xde\x1f\0\x90\xdf\x1f\ + \x01\x12;\n\rlast_block_id\x18\x05\x20\x01(\x0b2\x1e.tendermint.abci.typ\ + es.BlockIDB\x04\xc8\xde\x1f\0\x12\x1a\n\x10last_commit_hash\x18\x06\x20\ + \x01(\x0cB\0\x12\x13\n\tdata_hash\x18\x07\x20\x01(\x0cB\0\x12\x19\n\x0fv\ + alidators_hash\x18\x08\x20\x01(\x0cB\0\x12\x1e\n\x14next_validators_hash\ + \x18\t\x20\x01(\x0cB\0\x12\x18\n\x0econsensus_hash\x18\n\x20\x01(\x0cB\0\ + \x12\x12\n\x08app_hash\x18\x0b\x20\x01(\x0cB\0\x12\x1b\n\x11last_results\ + _hash\x18\x0c\x20\x01(\x0cB\0\x12\x17\n\revidence_hash\x18\r\x20\x01(\ + \x0cB\0\x12\x1a\n\x10proposer_address\x18\x0e\x20\x01(\x0cB\0:\0\"+\n\ + \x07Version\x12\x0f\n\x05Block\x18\x01\x20\x01(\x04B\0\x12\r\n\x03App\ \x18\x02\x20\x01(\x04B\0:\0\"]\n\x07BlockID\x12\x0e\n\x04hash\x18\x01\ \x20\x01(\x0cB\0\x12@\n\x0cparts_header\x18\x02\x20\x01(\x0b2$.tendermin\ t.abci.types.PartSetHeaderB\x04\xc8\xde\x1f\0:\0\"2\n\rPartSetHeader\x12\ @@ -11616,20 +11450,18 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x20\x01(\x0b2\x1a.google.protobuf.TimestampB\x08\xc8\xde\x1f\0\x90\xdf\ \x1f\x01\x12\x1c\n\x12total_voting_power\x18\x05\x20\x01(\x03B\0:\0*%\n\ \x0bCheckTxType\x12\x07\n\x03New\x10\0\x12\x0b\n\x07Recheck\x10\x01\x1a\ - \0B\x1c\xd0\xe2\x1e\x01\xb8\xe2\x1e\x01\xc0\xe3\x1e\x01\xe0\xe2\x1e\x01\ - \xc8\xe2\x1e\x01\xf8\xe1\x1e\x01\xa8\xe2\x1e\x01b\x06proto3\ + \0B\x1c\xe0\xe2\x1e\x01\xc0\xe3\x1e\x01\xc8\xe2\x1e\x01\xd0\xe2\x1e\x01\ + \xa8\xe2\x1e\x01\xb8\xe2\x1e\x01\xf8\xe1\x1e\x01b\x06proto3\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; 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() - }) - } + file_descriptor_proto_lazy.get(|| { + parse_descriptor_proto() + }) } diff --git a/src/messages/merkle.rs b/src/messages/merkle.rs index 22d7b3e..b7e4f7c 100644 --- a/src/messages/merkle.rs +++ b/src/messages/merkle.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 2.15.1. Do not edit +// This file is generated by rust-protobuf 2.16.2. Do not edit // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -15,17 +15,13 @@ #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] -#![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] //! Generated file from `crypto/merkle/merkle.proto` -use protobuf::Message as Message_imported_for_functions; -use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; - /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_15_1; +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_16_2; #[derive(PartialEq,Clone,Default)] pub struct ProofOp { @@ -217,39 +213,35 @@ impl ::protobuf::Message for ProofOp { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "type", - |m: &ProofOp| { &m.field_type }, - |m: &mut ProofOp| { &mut m.field_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "key", - |m: &ProofOp| { &m.key }, - |m: &mut ProofOp| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "data", - |m: &ProofOp| { &m.data }, - |m: &mut ProofOp| { &mut m.data }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ProofOp", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "type", + |m: &ProofOp| { &m.field_type }, + |m: &mut ProofOp| { &mut m.field_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "key", + |m: &ProofOp| { &m.key }, + |m: &mut ProofOp| { &mut m.key }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "data", + |m: &ProofOp| { &m.data }, + |m: &mut ProofOp| { &mut m.data }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ProofOp", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static ProofOp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(ProofOp::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ProofOp::new) } } @@ -399,29 +391,25 @@ impl ::protobuf::Message for Proof { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "ops", - |m: &Proof| { &m.ops }, - |m: &mut Proof| { &mut m.ops }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Proof", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "ops", + |m: &Proof| { &m.ops }, + |m: &mut Proof| { &mut m.ops }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Proof", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Proof { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Proof::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Proof::new) } } @@ -449,20 +437,18 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x07ProofOp\x12\x0e\n\x04type\x18\x01\x20\x01(\tB\0\x12\r\n\x03key\x18\ \x02\x20\x01(\x0cB\0\x12\x0e\n\x04data\x18\x03\x20\x01(\x0cB\0:\0\"?\n\ \x05Proof\x124\n\x03ops\x18\x01\x20\x03(\x0b2!.tendermint.crypto.merkle.\ - ProofOpB\x04\xc8\xde\x1f\0:\0B\x14\xd0\xe2\x1e\x01\xf8\xe1\x1e\x01\xa8\ - \xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01b\x06proto3\ + ProofOpB\x04\xc8\xde\x1f\0:\0B\x14\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xf8\ + \xe1\x1e\x01\xd0\xe2\x1e\x01\xa8\xe2\x1e\x01b\x06proto3\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; 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() - }) - } + file_descriptor_proto_lazy.get(|| { + parse_descriptor_proto() + }) } diff --git a/src/messages/types.rs b/src/messages/types.rs index 4357f46..f1aba61 100644 --- a/src/messages/types.rs +++ b/src/messages/types.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 2.15.1. Do not edit +// This file is generated by rust-protobuf 2.16.2. Do not edit // @generated // https://github.com/rust-lang/rust-clippy/issues/702 @@ -15,17 +15,13 @@ #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] -#![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] //! Generated file from `libs/kv/types.proto` -use protobuf::Message as Message_imported_for_functions; -use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; - /// Generated files are compatible only with the same version /// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_15_1; +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_16_2; #[derive(PartialEq,Clone,Default)] pub struct Pair { @@ -181,34 +177,30 @@ impl ::protobuf::Message for Pair { } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy::INIT; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "key", - |m: &Pair| { &m.key }, - |m: &mut Pair| { &mut m.key }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( - "value", - |m: &Pair| { &m.value }, - |m: &mut Pair| { &mut m.value }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Pair", - fields, - file_descriptor_proto() - ) - }) - } + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + let mut fields = ::std::vec::Vec::new(); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "key", + |m: &Pair| { &m.key }, + |m: &mut Pair| { &mut m.key }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( + "value", + |m: &Pair| { &m.value }, + |m: &mut Pair| { &mut m.value }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Pair", + fields, + file_descriptor_proto() + ) + }) } fn default_instance() -> &'static Pair { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy::INIT; - unsafe { - instance.get(Pair::new) - } + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pair::new) } } @@ -235,20 +227,18 @@ impl ::protobuf::reflect::ProtobufValue for Pair { static file_descriptor_proto_data: &'static [u8] = b"\ \n\x13libs/kv/types.proto\x12\x12tendermint.libs.kv\"(\n\x04Pair\x12\r\n\ \x03key\x18\x01\x20\x01(\x0cB\0\x12\x0f\n\x05value\x18\x02\x20\x01(\x0cB\ - \0:\0B\x1c\xb8\xe2\x1e\x01\xd0\xe2\x1e\x01\xe0\xe2\x1e\x01\xf8\xe1\x1e\ - \x01\xa8\xe2\x1e\x01\xc0\xe3\x1e\x01\xc8\xe2\x1e\x01b\x06proto3\ + \0:\0B\x1c\xc0\xe3\x1e\x01\xa8\xe2\x1e\x01\xc8\xe2\x1e\x01\xd0\xe2\x1e\ + \x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xe0\xe2\x1e\x01b\x06proto3\ "; -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy::INIT; +static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; 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() - }) - } + file_descriptor_proto_lazy.get(|| { + parse_descriptor_proto() + }) } diff --git a/src/server.rs b/src/server.rs index 56e3b5f..2887b02 100644 --- a/src/server.rs +++ b/src/server.rs @@ -1,65 +1,82 @@ use std::net::SocketAddr; use std::ops::DerefMut; -use std::sync::{Arc, Mutex}; +use std::sync::Arc; use env_logger::Env; -use tokio::codec::Decoder; -use tokio::io; +use futures::sink::SinkExt; +use futures::stream::StreamExt; use tokio::net::TcpListener; -use tokio::prelude::*; use tokio::runtime; +use tokio::sync::Mutex; +use tokio_util::codec::Decoder; use crate::codec::ABCICodec; use crate::messages::abci::*; use crate::Application; -/// Creates the TCP server and listens for connections from Tendermint -pub fn serve(app: A, addr: SocketAddr) -> io::Result<()> +async fn serve_async(app: A, addr: SocketAddr) where A: Application + 'static + Send + Sync, { - env_logger::from_env(Env::default().default_filter_or("info")) - .try_init() - .ok(); - let listener = TcpListener::bind(&addr).unwrap(); - let incoming = listener.incoming(); let app = Arc::new(Mutex::new(app)); - let server = incoming - .map_err(|err| panic!("Connection failed: {}", err)) - .for_each(move |socket| { + let mut listener = TcpListener::bind(&addr).await.unwrap(); + while let Some(Ok(socket)) = listener.next().await { + let app_instance = app.clone(); + tokio::spawn(async move { info!("Got connection! {:?}", socket); let framed = ABCICodec::new().framed(socket); - let (_writer, reader) = framed.split(); - let app_instance = Arc::clone(&app); - - let responses = reader.map(move |request| { + let (mut writer, mut reader) = framed.split(); + let mut mrequest = reader.next().await; + while let Some(Ok(ref request)) = mrequest { debug!("Got Request! {:?}", request); - respond(&app_instance, &request) - }); - - let writes = responses.fold(_writer, |writer, response| { + let response = respond(&app_instance, request).await; debug!("Return Response! {:?}", response); - writer.send(response) - }); - tokio::spawn(writes.then(|x| x.map_err(|_| ()).map(|_| ()))) + writer.send(response).await.expect("sending back response"); + mrequest = reader.next().await; + } + match mrequest { + None => { + panic!("connection dropped"); + } + Some(Err(e)) => { + panic!("decoding error: {:?}", e); + } + _ => { + unreachable!(); + } + } }); + } +} + +/// Creates the TCP server and listens for connections from Tendermint +pub fn serve(app: A, addr: SocketAddr) -> std::io::Result<()> +where + A: Application + 'static + Send + Sync, +{ + env_logger::from_env(Env::default().default_filter_or("info")) + .try_init() + .ok(); let mut rt = runtime::Builder::new() - .panic_handler(|_err| { - std::process::exit(1); - // std::panic::resume_unwind(err); - }) + .basic_scheduler() + .enable_io() .build() .unwrap(); - rt.block_on(server).unwrap(); + let default_hook = std::panic::take_hook(); + std::panic::set_hook(Box::new(move |info| { + default_hook(info); + std::process::exit(1); + })); + rt.block_on(serve_async(app, addr)); Ok(()) } -fn respond(app: &Arc>, request: &Request) -> Response +async fn respond(app: &Arc>, request: &Request) -> Response where A: Application + 'static + Send + Sync, { - let mut guard = app.lock().unwrap(); + let mut guard = app.lock().await; let app = guard.deref_mut(); let mut response = Response::new(); diff --git a/version.txt b/version.txt index d4d5b13..9314974 100644 --- a/version.txt +++ b/version.txt @@ -1,6 +1,6 @@ Version = TMCoreSemVer // TMCoreSemVer is the current version of Tendermint Core. - TMCoreSemVer = "0.33.5" + TMCoreSemVer = "0.33.6" // ABCISemVer is the semantic version of the ABCI library ABCISemVer = "0.16.2" ABCIVersion = ABCISemVer