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..7d4e0aa 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,19 +15,15 @@ #![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)] +#[derive(PartialEq, Clone, Default)] pub struct Request { // message oneof groups pub value: ::std::option::Option, @@ -42,7 +38,7 @@ impl<'a> ::std::default::Default for &'a Request { } } -#[derive(Clone,PartialEq,Debug)] +#[derive(Clone, PartialEq, Debug)] pub enum Request_oneof_value { echo(RequestEcho), flush(RequestFlush), @@ -64,11 +60,10 @@ impl Request { // .tendermint.abci.types.RequestEcho echo = 2; - 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) { @@ -113,11 +108,10 @@ impl Request { // .tendermint.abci.types.RequestFlush flush = 3; - 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) { @@ -140,7 +134,8 @@ impl Request { pub fn mut_flush(&mut self) -> &mut RequestFlush { if let ::std::option::Option::Some(Request_oneof_value::flush(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::flush(RequestFlush::new())); + self.value = + ::std::option::Option::Some(Request_oneof_value::flush(RequestFlush::new())); } match self.value { ::std::option::Option::Some(Request_oneof_value::flush(ref mut v)) => v, @@ -162,11 +157,10 @@ impl Request { // .tendermint.abci.types.RequestInfo info = 4; - 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) { @@ -211,11 +205,10 @@ impl Request { // .tendermint.abci.types.RequestSetOption set_option = 5; - 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) { @@ -238,7 +231,9 @@ impl Request { pub fn mut_set_option(&mut self) -> &mut RequestSetOption { if let ::std::option::Option::Some(Request_oneof_value::set_option(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::set_option(RequestSetOption::new())); + self.value = ::std::option::Option::Some(Request_oneof_value::set_option( + RequestSetOption::new(), + )); } match self.value { ::std::option::Option::Some(Request_oneof_value::set_option(ref mut v)) => v, @@ -260,11 +255,10 @@ impl Request { // .tendermint.abci.types.RequestInitChain init_chain = 6; - 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) { @@ -287,7 +281,9 @@ impl Request { pub fn mut_init_chain(&mut self) -> &mut RequestInitChain { if let ::std::option::Option::Some(Request_oneof_value::init_chain(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::init_chain(RequestInitChain::new())); + self.value = ::std::option::Option::Some(Request_oneof_value::init_chain( + RequestInitChain::new(), + )); } match self.value { ::std::option::Option::Some(Request_oneof_value::init_chain(ref mut v)) => v, @@ -309,11 +305,10 @@ impl Request { // .tendermint.abci.types.RequestQuery query = 7; - 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) { @@ -336,7 +331,8 @@ impl Request { pub fn mut_query(&mut self) -> &mut RequestQuery { if let ::std::option::Option::Some(Request_oneof_value::query(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::query(RequestQuery::new())); + self.value = + ::std::option::Option::Some(Request_oneof_value::query(RequestQuery::new())); } match self.value { ::std::option::Option::Some(Request_oneof_value::query(ref mut v)) => v, @@ -358,11 +354,10 @@ impl Request { // .tendermint.abci.types.RequestBeginBlock begin_block = 8; - 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) { @@ -385,7 +380,9 @@ impl Request { pub fn mut_begin_block(&mut self) -> &mut RequestBeginBlock { if let ::std::option::Option::Some(Request_oneof_value::begin_block(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::begin_block(RequestBeginBlock::new())); + self.value = ::std::option::Option::Some(Request_oneof_value::begin_block( + RequestBeginBlock::new(), + )); } match self.value { ::std::option::Option::Some(Request_oneof_value::begin_block(ref mut v)) => v, @@ -407,11 +404,10 @@ impl Request { // .tendermint.abci.types.RequestCheckTx check_tx = 9; - 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) { @@ -434,7 +430,8 @@ impl Request { pub fn mut_check_tx(&mut self) -> &mut RequestCheckTx { if let ::std::option::Option::Some(Request_oneof_value::check_tx(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::check_tx(RequestCheckTx::new())); + self.value = + ::std::option::Option::Some(Request_oneof_value::check_tx(RequestCheckTx::new())); } match self.value { ::std::option::Option::Some(Request_oneof_value::check_tx(ref mut v)) => v, @@ -456,11 +453,10 @@ impl Request { // .tendermint.abci.types.RequestDeliverTx deliver_tx = 19; - 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) { @@ -483,7 +479,9 @@ impl Request { pub fn mut_deliver_tx(&mut self) -> &mut RequestDeliverTx { if let ::std::option::Option::Some(Request_oneof_value::deliver_tx(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx(RequestDeliverTx::new())); + self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx( + RequestDeliverTx::new(), + )); } match self.value { ::std::option::Option::Some(Request_oneof_value::deliver_tx(ref mut v)) => v, @@ -505,11 +503,10 @@ impl Request { // .tendermint.abci.types.RequestEndBlock end_block = 11; - 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) { @@ -532,7 +529,8 @@ impl Request { pub fn mut_end_block(&mut self) -> &mut RequestEndBlock { if let ::std::option::Option::Some(Request_oneof_value::end_block(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::end_block(RequestEndBlock::new())); + self.value = + ::std::option::Option::Some(Request_oneof_value::end_block(RequestEndBlock::new())); } match self.value { ::std::option::Option::Some(Request_oneof_value::end_block(ref mut v)) => v, @@ -554,11 +552,10 @@ impl Request { // .tendermint.abci.types.RequestCommit commit = 12; - 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) { @@ -581,7 +578,8 @@ impl Request { pub fn mut_commit(&mut self) -> &mut RequestCommit { if let ::std::option::Option::Some(Request_oneof_value::commit(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Request_oneof_value::commit(RequestCommit::new())); + self.value = + ::std::option::Option::Some(Request_oneof_value::commit(RequestCommit::new())); } match self.value { ::std::option::Option::Some(Request_oneof_value::commit(ref mut v)) => v, @@ -662,79 +660,127 @@ impl ::protobuf::Message for Request { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 2 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::echo(is.read_message()?)); - }, + self.value = + ::std::option::Option::Some(Request_oneof_value::echo(is.read_message()?)); + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::flush(is.read_message()?)); - }, + self.value = + ::std::option::Option::Some(Request_oneof_value::flush(is.read_message()?)); + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::info(is.read_message()?)); - }, + self.value = + ::std::option::Option::Some(Request_oneof_value::info(is.read_message()?)); + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::set_option(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Request_oneof_value::set_option( + is.read_message()?, + )); + } 6 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::init_chain(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Request_oneof_value::init_chain( + is.read_message()?, + )); + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::query(is.read_message()?)); - }, + self.value = + ::std::option::Option::Some(Request_oneof_value::query(is.read_message()?)); + } 8 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::begin_block(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Request_oneof_value::begin_block( + is.read_message()?, + )); + } 9 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::check_tx(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Request_oneof_value::check_tx( + is.read_message()?, + )); + } 19 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Request_oneof_value::deliver_tx( + is.read_message()?, + )); + } 11 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::end_block(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Request_oneof_value::end_block( + is.read_message()?, + )); + } 12 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Request_oneof_value::commit(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Request_oneof_value::commit( + is.read_message()?, + )); + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -749,47 +795,47 @@ impl ::protobuf::Message for Request { &Request_oneof_value::echo(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::flush(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::info(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::set_option(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::init_chain(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::query(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::begin_block(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::check_tx(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::deliver_tx(ref v) => { let len = v.compute_size(); my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::end_block(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Request_oneof_value::commit(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } }; } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); @@ -797,64 +843,67 @@ impl ::protobuf::Message for Request { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let ::std::option::Option::Some(ref v) = self.value { match v { &Request_oneof_value::echo(ref v) => { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::flush(ref v) => { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::info(ref v) => { os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::set_option(ref v) => { os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::init_chain(ref v) => { os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::query(ref v) => { os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::begin_block(ref v) => { os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::check_tx(ref v) => { os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::deliver_tx(ref v) => { os.write_tag(19, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::end_block(ref v) => { os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Request_oneof_value::commit(ref v) => { os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } }; } os.write_unknown_fields(self.get_unknown_fields())?; @@ -892,79 +941,76 @@ 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) } } @@ -997,7 +1043,7 @@ impl ::protobuf::reflect::ProtobufValue for Request { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestEcho { // message fields pub message: ::std::string::String, @@ -1019,7 +1065,6 @@ impl RequestEcho { // string message = 1; - pub fn get_message(&self) -> &str { &self.message } @@ -1049,16 +1094,28 @@ impl ::protobuf::Message for RequestEcho { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.message)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.message, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1076,7 +1133,10 @@ impl ::protobuf::Message for RequestEcho { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.message.is_empty() { os.write_string(1, &self.message)?; } @@ -1115,29 +1175,29 @@ 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) } } @@ -1160,7 +1220,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestEcho { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestFlush { // special fields pub unknown_fields: ::protobuf::UnknownFields, @@ -1184,13 +1244,21 @@ impl ::protobuf::Message for RequestFlush { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1205,7 +1273,10 @@ impl ::protobuf::Message for RequestFlush { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -1241,24 +1312,21 @@ 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) } } @@ -1280,7 +1348,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestFlush { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestInfo { // message fields pub version: ::std::string::String, @@ -1304,7 +1372,6 @@ impl RequestInfo { // string version = 1; - pub fn get_version(&self) -> &str { &self.version } @@ -1330,7 +1397,6 @@ impl RequestInfo { // uint64 block_version = 2; - pub fn get_block_version(&self) -> u64 { self.block_version } @@ -1345,7 +1411,6 @@ impl RequestInfo { // uint64 p2p_version = 3; - pub fn get_p2p_version(&self) -> u64 { self.p2p_version } @@ -1364,30 +1429,46 @@ impl ::protobuf::Message for RequestInfo { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.version)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.version, + )?; + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint64()?; self.block_version = tmp; - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint64()?; self.p2p_version = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1401,17 +1482,28 @@ impl ::protobuf::Message for RequestInfo { my_size += ::protobuf::rt::string_size(1, &self.version); } if self.block_version != 0 { - my_size += ::protobuf::rt::value_size(2, self.block_version, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 2, + self.block_version, + ::protobuf::wire_format::WireTypeVarint, + ); } if self.p2p_version != 0 { - my_size += ::protobuf::rt::value_size(3, self.p2p_version, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 3, + self.p2p_version, + ::protobuf::wire_format::WireTypeVarint, + ); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.version.is_empty() { os.write_string(1, &self.version)?; } @@ -1456,39 +1548,45 @@ 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) } } @@ -1513,7 +1611,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestSetOption { // message fields pub key: ::std::string::String, @@ -1536,7 +1634,6 @@ impl RequestSetOption { // string key = 1; - pub fn get_key(&self) -> &str { &self.key } @@ -1562,7 +1659,6 @@ impl RequestSetOption { // string value = 2; - pub fn get_value(&self) -> &str { &self.value } @@ -1592,19 +1688,31 @@ impl ::protobuf::Message for RequestSetOption { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.key)?; - }, + } 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.value, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1625,7 +1733,10 @@ impl ::protobuf::Message for RequestSetOption { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.key.is_empty() { os.write_string(1, &self.key)?; } @@ -1667,34 +1778,37 @@ 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) } } @@ -1718,7 +1832,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestSetOption { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestInitChain { // message fields pub time: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>, @@ -1744,9 +1858,10 @@ impl RequestInitChain { // .google.protobuf.Timestamp time = 1; - 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(); @@ -1772,12 +1887,13 @@ impl RequestInitChain { // Take field pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp { - self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + self.time + .take() + .unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) } // string chain_id = 2; - pub fn get_chain_id(&self) -> &str { &self.chain_id } @@ -1803,9 +1919,10 @@ impl RequestInitChain { // .tendermint.abci.types.ConsensusParams consensus_params = 3; - 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(); @@ -1831,12 +1948,13 @@ impl RequestInitChain { // Take field pub fn take_consensus_params(&mut self) -> ConsensusParams { - self.consensus_params.take().unwrap_or_else(|| ConsensusParams::new()) + self.consensus_params + .take() + .unwrap_or_else(|| ConsensusParams::new()) } // repeated .tendermint.abci.types.ValidatorUpdate validators = 4; - pub fn get_validators(&self) -> &[ValidatorUpdate] { &self.validators } @@ -1861,7 +1979,6 @@ impl RequestInitChain { // bytes app_state_bytes = 5; - pub fn get_app_state_bytes(&self) -> &[u8] { &self.app_state_bytes } @@ -1892,42 +2009,66 @@ impl ::protobuf::Message for RequestInitChain { if !v.is_initialized() { return false; } - }; + } for v in &self.consensus_params { if !v.is_initialized() { return false; } - }; + } for v in &self.validators { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.time)?; - }, + } 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.chain_id)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.chain_id, + )?; + } 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.consensus_params)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.consensus_params, + )?; + } 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validators)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.validators, + )?; + } 5 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.app_state_bytes)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.app_state_bytes, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -1951,7 +2092,7 @@ impl ::protobuf::Message for RequestInitChain { for value in &self.validators { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if !self.app_state_bytes.is_empty() { my_size += ::protobuf::rt::bytes_size(5, &self.app_state_bytes); } @@ -1960,7 +2101,10 @@ impl ::protobuf::Message for RequestInitChain { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.time.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1978,7 +2122,7 @@ impl ::protobuf::Message for RequestInitChain { os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if !self.app_state_bytes.is_empty() { os.write_bytes(5, &self.app_state_bytes)?; } @@ -2017,49 +2161,67 @@ 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>>( + 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>( + |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>( + |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() - ) - }) - } + |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) } } @@ -2086,7 +2248,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestInitChain { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestQuery { // message fields pub data: ::std::vec::Vec, @@ -2111,7 +2273,6 @@ impl RequestQuery { // bytes data = 1; - pub fn get_data(&self) -> &[u8] { &self.data } @@ -2137,7 +2298,6 @@ impl RequestQuery { // string path = 2; - pub fn get_path(&self) -> &str { &self.path } @@ -2163,7 +2323,6 @@ impl RequestQuery { // int64 height = 3; - pub fn get_height(&self) -> i64 { self.height } @@ -2178,7 +2337,6 @@ impl RequestQuery { // bool prove = 4; - pub fn get_prove(&self) -> bool { self.prove } @@ -2197,33 +2355,49 @@ impl ::protobuf::Message for RequestQuery { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?; - }, + } 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.path)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.path, + )?; + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.height = tmp; - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.prove = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2240,7 +2414,8 @@ impl ::protobuf::Message for RequestQuery { my_size += ::protobuf::rt::string_size(2, &self.path); } if self.height != 0 { - my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint); } if self.prove != false { my_size += 2; @@ -2250,7 +2425,10 @@ impl ::protobuf::Message for RequestQuery { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.data.is_empty() { os.write_bytes(1, &self.data)?; } @@ -2298,44 +2476,53 @@ 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) } } @@ -2361,7 +2548,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestQuery { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestBeginBlock { // message fields pub hash: ::std::vec::Vec, @@ -2386,7 +2573,6 @@ impl RequestBeginBlock { // bytes hash = 1; - pub fn get_hash(&self) -> &[u8] { &self.hash } @@ -2412,9 +2598,10 @@ impl RequestBeginBlock { // .tendermint.abci.types.Header header = 2; - 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(); @@ -2445,9 +2632,10 @@ impl RequestBeginBlock { // .tendermint.abci.types.LastCommitInfo last_commit_info = 3; - 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(); @@ -2473,12 +2661,13 @@ impl RequestBeginBlock { // Take field pub fn take_last_commit_info(&mut self) -> LastCommitInfo { - self.last_commit_info.take().unwrap_or_else(|| LastCommitInfo::new()) + self.last_commit_info + .take() + .unwrap_or_else(|| LastCommitInfo::new()) } // repeated .tendermint.abci.types.Evidence byzantine_validators = 4; - pub fn get_byzantine_validators(&self) -> &[Evidence] { &self.byzantine_validators } @@ -2498,7 +2687,10 @@ impl RequestBeginBlock { // Take field pub fn take_byzantine_validators(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.byzantine_validators, ::protobuf::RepeatedField::new()) + ::std::mem::replace( + &mut self.byzantine_validators, + ::protobuf::RepeatedField::new(), + ) } } @@ -2508,39 +2700,55 @@ impl ::protobuf::Message for RequestBeginBlock { if !v.is_initialized() { return false; } - }; + } for v in &self.last_commit_info { if !v.is_initialized() { return false; } - }; + } for v in &self.byzantine_validators { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?; - }, + } 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.header)?; - }, + } 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.last_commit_info)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.last_commit_info, + )?; + } 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.byzantine_validators)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.byzantine_validators, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2564,13 +2772,16 @@ impl ::protobuf::Message for RequestBeginBlock { for value in &self.byzantine_validators { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.hash.is_empty() { os.write_bytes(1, &self.hash)?; } @@ -2588,7 +2799,7 @@ impl ::protobuf::Message for RequestBeginBlock { os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -2624,44 +2835,59 @@ 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
>( + 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>( + |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>( + |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() - ) - }) - } + |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) } } @@ -2687,7 +2913,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestBeginBlock { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestCheckTx { // message fields pub tx: ::std::vec::Vec, @@ -2710,7 +2936,6 @@ impl RequestCheckTx { // bytes tx = 1; - pub fn get_tx(&self) -> &[u8] { &self.tx } @@ -2736,7 +2961,6 @@ impl RequestCheckTx { // .tendermint.abci.types.CheckTxType type = 2; - pub fn get_field_type(&self) -> CheckTxType { self.field_type } @@ -2755,19 +2979,31 @@ impl ::protobuf::Message for RequestCheckTx { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.tx)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 2, &mut self.unknown_fields)? - }, + } + 2 => ::protobuf::rt::read_proto3_enum_with_unknown_fields_into( + wire_type, + is, + &mut self.field_type, + 2, + &mut self.unknown_fields, + )?, _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2788,12 +3024,15 @@ impl ::protobuf::Message for RequestCheckTx { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.tx.is_empty() { 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 +3069,37 @@ 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) } } @@ -2881,7 +3123,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestCheckTx { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestDeliverTx { // message fields pub tx: ::std::vec::Vec, @@ -2903,7 +3145,6 @@ impl RequestDeliverTx { // bytes tx = 1; - pub fn get_tx(&self) -> &[u8] { &self.tx } @@ -2933,16 +3174,24 @@ impl ::protobuf::Message for RequestDeliverTx { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.tx)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -2960,7 +3209,10 @@ impl ::protobuf::Message for RequestDeliverTx { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.tx.is_empty() { os.write_bytes(1, &self.tx)?; } @@ -2999,29 +3251,29 @@ 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) } } @@ -3044,7 +3296,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestDeliverTx { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestEndBlock { // message fields pub height: i64, @@ -3066,7 +3318,6 @@ impl RequestEndBlock { // int64 height = 1; - pub fn get_height(&self) -> i64 { self.height } @@ -3085,20 +3336,30 @@ impl ::protobuf::Message for RequestEndBlock { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.height = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3109,14 +3370,18 @@ impl ::protobuf::Message for RequestEndBlock { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.height != 0 { - my_size += ::protobuf::rt::value_size(1, self.height, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(1, self.height, ::protobuf::wire_format::WireTypeVarint); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.height != 0 { os.write_int64(1, self.height)?; } @@ -3155,29 +3420,29 @@ 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) } } @@ -3200,7 +3465,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestEndBlock { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct RequestCommit { // special fields pub unknown_fields: ::protobuf::UnknownFields, @@ -3224,13 +3489,21 @@ impl ::protobuf::Message for RequestCommit { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -3245,7 +3518,10 @@ impl ::protobuf::Message for RequestCommit { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -3281,24 +3557,21 @@ 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) } } @@ -3320,7 +3593,7 @@ impl ::protobuf::reflect::ProtobufValue for RequestCommit { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Response { // message oneof groups pub value: ::std::option::Option, @@ -3335,7 +3608,7 @@ impl<'a> ::std::default::Default for &'a Response { } } -#[derive(Clone,PartialEq,Debug)] +#[derive(Clone, PartialEq, Debug)] pub enum Response_oneof_value { exception(ResponseException), echo(ResponseEcho), @@ -3358,11 +3631,10 @@ impl Response { // .tendermint.abci.types.ResponseException exception = 1; - 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) { @@ -3385,7 +3657,9 @@ impl Response { pub fn mut_exception(&mut self) -> &mut ResponseException { if let ::std::option::Option::Some(Response_oneof_value::exception(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::exception(ResponseException::new())); + self.value = ::std::option::Option::Some(Response_oneof_value::exception( + ResponseException::new(), + )); } match self.value { ::std::option::Option::Some(Response_oneof_value::exception(ref mut v)) => v, @@ -3407,11 +3681,10 @@ impl Response { // .tendermint.abci.types.ResponseEcho echo = 2; - 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) { @@ -3434,7 +3707,8 @@ impl Response { pub fn mut_echo(&mut self) -> &mut ResponseEcho { if let ::std::option::Option::Some(Response_oneof_value::echo(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::echo(ResponseEcho::new())); + self.value = + ::std::option::Option::Some(Response_oneof_value::echo(ResponseEcho::new())); } match self.value { ::std::option::Option::Some(Response_oneof_value::echo(ref mut v)) => v, @@ -3456,11 +3730,10 @@ impl Response { // .tendermint.abci.types.ResponseFlush flush = 3; - 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) { @@ -3483,7 +3756,8 @@ impl Response { pub fn mut_flush(&mut self) -> &mut ResponseFlush { if let ::std::option::Option::Some(Response_oneof_value::flush(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::flush(ResponseFlush::new())); + self.value = + ::std::option::Option::Some(Response_oneof_value::flush(ResponseFlush::new())); } match self.value { ::std::option::Option::Some(Response_oneof_value::flush(ref mut v)) => v, @@ -3505,11 +3779,10 @@ impl Response { // .tendermint.abci.types.ResponseInfo info = 4; - 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) { @@ -3532,7 +3805,8 @@ impl Response { pub fn mut_info(&mut self) -> &mut ResponseInfo { if let ::std::option::Option::Some(Response_oneof_value::info(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::info(ResponseInfo::new())); + self.value = + ::std::option::Option::Some(Response_oneof_value::info(ResponseInfo::new())); } match self.value { ::std::option::Option::Some(Response_oneof_value::info(ref mut v)) => v, @@ -3554,11 +3828,10 @@ impl Response { // .tendermint.abci.types.ResponseSetOption set_option = 5; - 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) { @@ -3581,7 +3854,9 @@ impl Response { pub fn mut_set_option(&mut self) -> &mut ResponseSetOption { if let ::std::option::Option::Some(Response_oneof_value::set_option(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::set_option(ResponseSetOption::new())); + self.value = ::std::option::Option::Some(Response_oneof_value::set_option( + ResponseSetOption::new(), + )); } match self.value { ::std::option::Option::Some(Response_oneof_value::set_option(ref mut v)) => v, @@ -3603,11 +3878,10 @@ impl Response { // .tendermint.abci.types.ResponseInitChain init_chain = 6; - 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) { @@ -3630,7 +3904,9 @@ impl Response { pub fn mut_init_chain(&mut self) -> &mut ResponseInitChain { if let ::std::option::Option::Some(Response_oneof_value::init_chain(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::init_chain(ResponseInitChain::new())); + self.value = ::std::option::Option::Some(Response_oneof_value::init_chain( + ResponseInitChain::new(), + )); } match self.value { ::std::option::Option::Some(Response_oneof_value::init_chain(ref mut v)) => v, @@ -3652,11 +3928,10 @@ impl Response { // .tendermint.abci.types.ResponseQuery query = 7; - 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) { @@ -3679,7 +3954,8 @@ impl Response { pub fn mut_query(&mut self) -> &mut ResponseQuery { if let ::std::option::Option::Some(Response_oneof_value::query(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::query(ResponseQuery::new())); + self.value = + ::std::option::Option::Some(Response_oneof_value::query(ResponseQuery::new())); } match self.value { ::std::option::Option::Some(Response_oneof_value::query(ref mut v)) => v, @@ -3701,11 +3977,10 @@ impl Response { // .tendermint.abci.types.ResponseBeginBlock begin_block = 8; - 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) { @@ -3728,7 +4003,9 @@ impl Response { pub fn mut_begin_block(&mut self) -> &mut ResponseBeginBlock { if let ::std::option::Option::Some(Response_oneof_value::begin_block(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::begin_block(ResponseBeginBlock::new())); + self.value = ::std::option::Option::Some(Response_oneof_value::begin_block( + ResponseBeginBlock::new(), + )); } match self.value { ::std::option::Option::Some(Response_oneof_value::begin_block(ref mut v)) => v, @@ -3750,11 +4027,10 @@ impl Response { // .tendermint.abci.types.ResponseCheckTx check_tx = 9; - 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) { @@ -3777,7 +4053,8 @@ impl Response { pub fn mut_check_tx(&mut self) -> &mut ResponseCheckTx { if let ::std::option::Option::Some(Response_oneof_value::check_tx(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::check_tx(ResponseCheckTx::new())); + self.value = + ::std::option::Option::Some(Response_oneof_value::check_tx(ResponseCheckTx::new())); } match self.value { ::std::option::Option::Some(Response_oneof_value::check_tx(ref mut v)) => v, @@ -3799,11 +4076,10 @@ impl Response { // .tendermint.abci.types.ResponseDeliverTx deliver_tx = 10; - 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) { @@ -3826,7 +4102,9 @@ impl Response { pub fn mut_deliver_tx(&mut self) -> &mut ResponseDeliverTx { if let ::std::option::Option::Some(Response_oneof_value::deliver_tx(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx(ResponseDeliverTx::new())); + self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx( + ResponseDeliverTx::new(), + )); } match self.value { ::std::option::Option::Some(Response_oneof_value::deliver_tx(ref mut v)) => v, @@ -3848,11 +4126,10 @@ impl Response { // .tendermint.abci.types.ResponseEndBlock end_block = 11; - 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) { @@ -3875,7 +4152,9 @@ impl Response { pub fn mut_end_block(&mut self) -> &mut ResponseEndBlock { if let ::std::option::Option::Some(Response_oneof_value::end_block(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::end_block(ResponseEndBlock::new())); + self.value = ::std::option::Option::Some(Response_oneof_value::end_block( + ResponseEndBlock::new(), + )); } match self.value { ::std::option::Option::Some(Response_oneof_value::end_block(ref mut v)) => v, @@ -3897,11 +4176,10 @@ impl Response { // .tendermint.abci.types.ResponseCommit commit = 12; - 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) { @@ -3924,7 +4202,8 @@ impl Response { pub fn mut_commit(&mut self) -> &mut ResponseCommit { if let ::std::option::Option::Some(Response_oneof_value::commit(_)) = self.value { } else { - self.value = ::std::option::Option::Some(Response_oneof_value::commit(ResponseCommit::new())); + self.value = + ::std::option::Option::Some(Response_oneof_value::commit(ResponseCommit::new())); } match self.value { ::std::option::Option::Some(Response_oneof_value::commit(ref mut v)) => v, @@ -4010,85 +4289,139 @@ impl ::protobuf::Message for Response { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::exception(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::exception( + is.read_message()?, + )); + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::echo(is.read_message()?)); - }, + self.value = + ::std::option::Option::Some(Response_oneof_value::echo(is.read_message()?)); + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::flush(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::flush( + is.read_message()?, + )); + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::info(is.read_message()?)); - }, + self.value = + ::std::option::Option::Some(Response_oneof_value::info(is.read_message()?)); + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::set_option(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::set_option( + is.read_message()?, + )); + } 6 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::init_chain(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::init_chain( + is.read_message()?, + )); + } 7 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::query(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::query( + is.read_message()?, + )); + } 8 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::begin_block(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::begin_block( + is.read_message()?, + )); + } 9 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::check_tx(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::check_tx( + is.read_message()?, + )); + } 10 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::deliver_tx( + is.read_message()?, + )); + } 11 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::end_block(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::end_block( + is.read_message()?, + )); + } 12 => { if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } - self.value = ::std::option::Option::Some(Response_oneof_value::commit(is.read_message()?)); - }, + self.value = ::std::option::Option::Some(Response_oneof_value::commit( + is.read_message()?, + )); + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4103,51 +4436,51 @@ impl ::protobuf::Message for Response { &Response_oneof_value::exception(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::echo(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::flush(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::info(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::set_option(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::init_chain(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::query(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::begin_block(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::check_tx(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::deliver_tx(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::end_block(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } &Response_oneof_value::commit(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, + } }; } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); @@ -4155,69 +4488,72 @@ impl ::protobuf::Message for Response { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let ::std::option::Option::Some(ref v) = self.value { match v { &Response_oneof_value::exception(ref v) => { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::echo(ref v) => { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::flush(ref v) => { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::info(ref v) => { os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::set_option(ref v) => { os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::init_chain(ref v) => { os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::query(ref v) => { os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::begin_block(ref v) => { os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::check_tx(ref v) => { os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::deliver_tx(ref v) => { os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::end_block(ref v) => { os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } &Response_oneof_value::commit(ref v) => { os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }, + } }; } os.write_unknown_fields(self.get_unknown_fields())?; @@ -4255,84 +4591,81 @@ 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) } } @@ -4366,7 +4699,7 @@ impl ::protobuf::reflect::ProtobufValue for Response { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseException { // message fields pub error: ::std::string::String, @@ -4388,7 +4721,6 @@ impl ResponseException { // string error = 1; - pub fn get_error(&self) -> &str { &self.error } @@ -4418,16 +4750,28 @@ impl ::protobuf::Message for ResponseException { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.error)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.error, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4445,7 +4789,10 @@ impl ::protobuf::Message for ResponseException { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.error.is_empty() { os.write_string(1, &self.error)?; } @@ -4484,29 +4831,29 @@ 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) } } @@ -4529,7 +4876,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseException { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseEcho { // message fields pub message: ::std::string::String, @@ -4551,7 +4898,6 @@ impl ResponseEcho { // string message = 1; - pub fn get_message(&self) -> &str { &self.message } @@ -4581,16 +4927,28 @@ impl ::protobuf::Message for ResponseEcho { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.message)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.message, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4608,7 +4966,10 @@ impl ::protobuf::Message for ResponseEcho { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.message.is_empty() { os.write_string(1, &self.message)?; } @@ -4647,29 +5008,29 @@ 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) } } @@ -4692,7 +5053,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseEcho { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseFlush { // special fields pub unknown_fields: ::protobuf::UnknownFields, @@ -4716,13 +5077,21 @@ impl ::protobuf::Message for ResponseFlush { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4737,7 +5106,10 @@ impl ::protobuf::Message for ResponseFlush { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -4773,24 +5145,21 @@ 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) } } @@ -4812,7 +5181,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseFlush { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseInfo { // message fields pub data: ::std::string::String, @@ -4838,7 +5207,6 @@ impl ResponseInfo { // string data = 1; - pub fn get_data(&self) -> &str { &self.data } @@ -4864,7 +5232,6 @@ impl ResponseInfo { // string version = 2; - pub fn get_version(&self) -> &str { &self.version } @@ -4890,7 +5257,6 @@ impl ResponseInfo { // uint64 app_version = 3; - pub fn get_app_version(&self) -> u64 { self.app_version } @@ -4905,7 +5271,6 @@ impl ResponseInfo { // int64 last_block_height = 4; - pub fn get_last_block_height(&self) -> i64 { self.last_block_height } @@ -4920,7 +5285,6 @@ impl ResponseInfo { // bytes last_block_app_hash = 5; - pub fn get_last_block_app_hash(&self) -> &[u8] { &self.last_block_app_hash } @@ -4950,36 +5314,60 @@ impl ::protobuf::Message for ResponseInfo { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.data)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.data, + )?; + } 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.version)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.version, + )?; + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint64()?; self.app_version = tmp; - }, + } 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.last_block_height = tmp; - }, + } 5 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_block_app_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.last_block_app_hash, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -4996,10 +5384,18 @@ impl ::protobuf::Message for ResponseInfo { my_size += ::protobuf::rt::string_size(2, &self.version); } if self.app_version != 0 { - my_size += ::protobuf::rt::value_size(3, self.app_version, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 3, + self.app_version, + ::protobuf::wire_format::WireTypeVarint, + ); } if self.last_block_height != 0 { - my_size += ::protobuf::rt::value_size(4, self.last_block_height, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 4, + self.last_block_height, + ::protobuf::wire_format::WireTypeVarint, + ); } if !self.last_block_app_hash.is_empty() { my_size += ::protobuf::rt::bytes_size(5, &self.last_block_app_hash); @@ -5009,7 +5405,10 @@ impl ::protobuf::Message for ResponseInfo { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.data.is_empty() { os.write_string(1, &self.data)?; } @@ -5060,49 +5459,61 @@ 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) } } @@ -5129,7 +5540,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseSetOption { // message fields pub code: u32, @@ -5153,7 +5564,6 @@ impl ResponseSetOption { // uint32 code = 1; - pub fn get_code(&self) -> u32 { self.code } @@ -5168,7 +5578,6 @@ impl ResponseSetOption { // string log = 3; - pub fn get_log(&self) -> &str { &self.log } @@ -5194,7 +5603,6 @@ impl ResponseSetOption { // string info = 4; - pub fn get_info(&self) -> &str { &self.info } @@ -5224,26 +5632,40 @@ impl ::protobuf::Message for ResponseSetOption { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.code = tmp; - }, + } 3 => { ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?; - }, + } 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.info, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5254,7 +5676,8 @@ impl ::protobuf::Message for ResponseSetOption { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.code != 0 { - my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint); } if !self.log.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.log); @@ -5267,7 +5690,10 @@ impl ::protobuf::Message for ResponseSetOption { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.code != 0 { os.write_uint32(1, self.code)?; } @@ -5312,39 +5738,45 @@ 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) } } @@ -5369,7 +5801,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseSetOption { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseInitChain { // message fields pub consensus_params: ::protobuf::SingularPtrField, @@ -5392,9 +5824,10 @@ impl ResponseInitChain { // .tendermint.abci.types.ConsensusParams consensus_params = 1; - 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(); @@ -5420,12 +5853,13 @@ impl ResponseInitChain { // Take field pub fn take_consensus_params(&mut self) -> ConsensusParams { - self.consensus_params.take().unwrap_or_else(|| ConsensusParams::new()) + self.consensus_params + .take() + .unwrap_or_else(|| ConsensusParams::new()) } // repeated .tendermint.abci.types.ValidatorUpdate validators = 2; - pub fn get_validators(&self) -> &[ValidatorUpdate] { &self.validators } @@ -5455,28 +5889,44 @@ impl ::protobuf::Message for ResponseInitChain { if !v.is_initialized() { return false; } - }; + } for v in &self.validators { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.consensus_params)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.consensus_params, + )?; + } 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validators)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.validators, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5493,13 +5943,16 @@ impl ::protobuf::Message for ResponseInitChain { for value in &self.validators { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.consensus_params.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -5509,7 +5962,7 @@ impl ::protobuf::Message for ResponseInitChain { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -5545,34 +5998,41 @@ 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>( + 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>( + |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() - ) - }) - } + |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) } } @@ -5596,7 +6056,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseInitChain { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseQuery { // message fields pub code: u32, @@ -5626,7 +6086,6 @@ impl ResponseQuery { // uint32 code = 1; - pub fn get_code(&self) -> u32 { self.code } @@ -5641,7 +6100,6 @@ impl ResponseQuery { // string log = 3; - pub fn get_log(&self) -> &str { &self.log } @@ -5667,7 +6125,6 @@ impl ResponseQuery { // string info = 4; - pub fn get_info(&self) -> &str { &self.info } @@ -5693,7 +6150,6 @@ impl ResponseQuery { // int64 index = 5; - pub fn get_index(&self) -> i64 { self.index } @@ -5708,7 +6164,6 @@ impl ResponseQuery { // bytes key = 6; - pub fn get_key(&self) -> &[u8] { &self.key } @@ -5734,7 +6189,6 @@ impl ResponseQuery { // bytes value = 7; - pub fn get_value(&self) -> &[u8] { &self.value } @@ -5760,9 +6214,10 @@ impl ResponseQuery { // .tendermint.crypto.merkle.Proof proof = 8; - 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(); @@ -5788,12 +6243,13 @@ impl ResponseQuery { // Take field pub fn take_proof(&mut self) -> super::merkle::Proof { - self.proof.take().unwrap_or_else(|| super::merkle::Proof::new()) + self.proof + .take() + .unwrap_or_else(|| super::merkle::Proof::new()) } // int64 height = 9; - pub fn get_height(&self) -> i64 { self.height } @@ -5808,7 +6264,6 @@ impl ResponseQuery { // string codespace = 10; - pub fn get_codespace(&self) -> &str { &self.codespace } @@ -5839,56 +6294,82 @@ impl ::protobuf::Message for ResponseQuery { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.code = tmp; - }, + } 3 => { ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?; - }, + } 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.info, + )?; + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.index = tmp; - }, + } 6 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.key)?; - }, + } 7 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.value, + )?; + } 8 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.proof)?; - }, + } 9 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.height = tmp; - }, + } 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.codespace)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.codespace, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -5899,7 +6380,8 @@ impl ::protobuf::Message for ResponseQuery { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.code != 0 { - my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint); } if !self.log.is_empty() { my_size += ::protobuf::rt::string_size(3, &self.log); @@ -5908,7 +6390,8 @@ impl ::protobuf::Message for ResponseQuery { my_size += ::protobuf::rt::string_size(4, &self.info); } if self.index != 0 { - my_size += ::protobuf::rt::value_size(5, self.index, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(5, self.index, ::protobuf::wire_format::WireTypeVarint); } if !self.key.is_empty() { my_size += ::protobuf::rt::bytes_size(6, &self.key); @@ -5921,7 +6404,8 @@ impl ::protobuf::Message for ResponseQuery { my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } if self.height != 0 { - my_size += ::protobuf::rt::value_size(9, self.height, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(9, self.height, ::protobuf::wire_format::WireTypeVarint); } if !self.codespace.is_empty() { my_size += ::protobuf::rt::string_size(10, &self.codespace); @@ -5931,7 +6415,10 @@ impl ::protobuf::Message for ResponseQuery { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.code != 0 { os.write_uint32(1, self.code)?; } @@ -5996,69 +6483,95 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -6089,7 +6602,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseQuery { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseBeginBlock { // message fields pub events: ::protobuf::RepeatedField, @@ -6111,7 +6624,6 @@ impl ResponseBeginBlock { // repeated .tendermint.abci.types.Event events = 1; - pub fn get_events(&self) -> &[Event] { &self.events } @@ -6141,20 +6653,28 @@ impl ::protobuf::Message for ResponseBeginBlock { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.events)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -6167,18 +6687,21 @@ impl ::protobuf::Message for ResponseBeginBlock { for value in &self.events { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.events { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -6214,29 +6737,31 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -6259,7 +6784,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseBeginBlock { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseCheckTx { // message fields pub code: u32, @@ -6288,7 +6813,6 @@ impl ResponseCheckTx { // uint32 code = 1; - pub fn get_code(&self) -> u32 { self.code } @@ -6303,7 +6827,6 @@ impl ResponseCheckTx { // bytes data = 2; - pub fn get_data(&self) -> &[u8] { &self.data } @@ -6329,7 +6852,6 @@ impl ResponseCheckTx { // string log = 3; - pub fn get_log(&self) -> &str { &self.log } @@ -6355,7 +6877,6 @@ impl ResponseCheckTx { // string info = 4; - pub fn get_info(&self) -> &str { &self.info } @@ -6381,7 +6902,6 @@ impl ResponseCheckTx { // int64 gas_wanted = 5; - pub fn get_gas_wanted(&self) -> i64 { self.gas_wanted } @@ -6396,7 +6916,6 @@ impl ResponseCheckTx { // int64 gas_used = 6; - pub fn get_gas_used(&self) -> i64 { self.gas_used } @@ -6411,7 +6930,6 @@ impl ResponseCheckTx { // repeated .tendermint.abci.types.Event events = 7; - pub fn get_events(&self) -> &[Event] { &self.events } @@ -6436,7 +6954,6 @@ impl ResponseCheckTx { // string codespace = 8; - pub fn get_codespace(&self) -> &str { &self.codespace } @@ -6467,53 +6984,75 @@ impl ::protobuf::Message for ResponseCheckTx { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.code = tmp; - }, + } 2 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?; - }, + } 3 => { ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?; - }, + } 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.info, + )?; + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.gas_wanted = tmp; - }, + } 6 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.gas_used = tmp; - }, + } 7 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.events)?; - }, + } 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.codespace)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.codespace, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -6524,7 +7063,8 @@ impl ::protobuf::Message for ResponseCheckTx { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.code != 0 { - my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint); } if !self.data.is_empty() { my_size += ::protobuf::rt::bytes_size(2, &self.data); @@ -6536,15 +7076,23 @@ impl ::protobuf::Message for ResponseCheckTx { my_size += ::protobuf::rt::string_size(4, &self.info); } if self.gas_wanted != 0 { - my_size += ::protobuf::rt::value_size(5, self.gas_wanted, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 5, + self.gas_wanted, + ::protobuf::wire_format::WireTypeVarint, + ); } if self.gas_used != 0 { - my_size += ::protobuf::rt::value_size(6, self.gas_used, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 6, + self.gas_used, + ::protobuf::wire_format::WireTypeVarint, + ); } for value in &self.events { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if !self.codespace.is_empty() { my_size += ::protobuf::rt::string_size(8, &self.codespace); } @@ -6553,7 +7101,10 @@ impl ::protobuf::Message for ResponseCheckTx { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.code != 0 { os.write_uint32(1, self.code)?; } @@ -6576,7 +7127,7 @@ impl ::protobuf::Message for ResponseCheckTx { os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if !self.codespace.is_empty() { os.write_string(8, &self.codespace)?; } @@ -6615,64 +7166,87 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -6702,7 +7276,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseCheckTx { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseDeliverTx { // message fields pub code: u32, @@ -6731,7 +7305,6 @@ impl ResponseDeliverTx { // uint32 code = 1; - pub fn get_code(&self) -> u32 { self.code } @@ -6746,7 +7319,6 @@ impl ResponseDeliverTx { // bytes data = 2; - pub fn get_data(&self) -> &[u8] { &self.data } @@ -6772,7 +7344,6 @@ impl ResponseDeliverTx { // string log = 3; - pub fn get_log(&self) -> &str { &self.log } @@ -6798,7 +7369,6 @@ impl ResponseDeliverTx { // string info = 4; - pub fn get_info(&self) -> &str { &self.info } @@ -6824,7 +7394,6 @@ impl ResponseDeliverTx { // int64 gas_wanted = 5; - pub fn get_gas_wanted(&self) -> i64 { self.gas_wanted } @@ -6839,7 +7408,6 @@ impl ResponseDeliverTx { // int64 gas_used = 6; - pub fn get_gas_used(&self) -> i64 { self.gas_used } @@ -6854,7 +7422,6 @@ impl ResponseDeliverTx { // repeated .tendermint.abci.types.Event events = 7; - pub fn get_events(&self) -> &[Event] { &self.events } @@ -6879,7 +7446,6 @@ impl ResponseDeliverTx { // string codespace = 8; - pub fn get_codespace(&self) -> &str { &self.codespace } @@ -6910,53 +7476,75 @@ impl ::protobuf::Message for ResponseDeliverTx { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint32()?; self.code = tmp; - }, + } 2 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?; - }, + } 3 => { ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.log)?; - }, + } 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.info)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.info, + )?; + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.gas_wanted = tmp; - }, + } 6 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.gas_used = tmp; - }, + } 7 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.events)?; - }, + } 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.codespace)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.codespace, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -6967,7 +7555,8 @@ impl ::protobuf::Message for ResponseDeliverTx { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.code != 0 { - my_size += ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(1, self.code, ::protobuf::wire_format::WireTypeVarint); } if !self.data.is_empty() { my_size += ::protobuf::rt::bytes_size(2, &self.data); @@ -6979,15 +7568,23 @@ impl ::protobuf::Message for ResponseDeliverTx { my_size += ::protobuf::rt::string_size(4, &self.info); } if self.gas_wanted != 0 { - my_size += ::protobuf::rt::value_size(5, self.gas_wanted, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 5, + self.gas_wanted, + ::protobuf::wire_format::WireTypeVarint, + ); } if self.gas_used != 0 { - my_size += ::protobuf::rt::value_size(6, self.gas_used, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 6, + self.gas_used, + ::protobuf::wire_format::WireTypeVarint, + ); } for value in &self.events { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if !self.codespace.is_empty() { my_size += ::protobuf::rt::string_size(8, &self.codespace); } @@ -6996,7 +7593,10 @@ impl ::protobuf::Message for ResponseDeliverTx { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.code != 0 { os.write_uint32(1, self.code)?; } @@ -7019,7 +7619,7 @@ impl ::protobuf::Message for ResponseDeliverTx { os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if !self.codespace.is_empty() { os.write_string(8, &self.codespace)?; } @@ -7058,64 +7658,87 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -7145,7 +7768,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseDeliverTx { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseEndBlock { // message fields pub validator_updates: ::protobuf::RepeatedField, @@ -7169,7 +7792,6 @@ impl ResponseEndBlock { // repeated .tendermint.abci.types.ValidatorUpdate validator_updates = 1; - pub fn get_validator_updates(&self) -> &[ValidatorUpdate] { &self.validator_updates } @@ -7189,14 +7811,18 @@ impl ResponseEndBlock { // Take field pub fn take_validator_updates(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.validator_updates, ::protobuf::RepeatedField::new()) + ::std::mem::replace( + &mut self.validator_updates, + ::protobuf::RepeatedField::new(), + ) } // .tendermint.abci.types.ConsensusParams consensus_param_updates = 2; - 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(); @@ -7222,12 +7848,13 @@ impl ResponseEndBlock { // Take field pub fn take_consensus_param_updates(&mut self) -> ConsensusParams { - self.consensus_param_updates.take().unwrap_or_else(|| ConsensusParams::new()) + self.consensus_param_updates + .take() + .unwrap_or_else(|| ConsensusParams::new()) } // repeated .tendermint.abci.types.Event events = 3; - pub fn get_events(&self) -> &[Event] { &self.events } @@ -7257,36 +7884,52 @@ impl ::protobuf::Message for ResponseEndBlock { if !v.is_initialized() { return false; } - }; + } for v in &self.consensus_param_updates { if !v.is_initialized() { return false; } - }; + } for v in &self.events { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validator_updates)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.validator_updates, + )?; + } 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.consensus_param_updates)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.consensus_param_updates, + )?; + } 3 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.events)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -7299,7 +7942,7 @@ impl ::protobuf::Message for ResponseEndBlock { for value in &self.validator_updates { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } if let Some(ref v) = self.consensus_param_updates.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; @@ -7307,18 +7950,21 @@ impl ::protobuf::Message for ResponseEndBlock { for value in &self.events { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.validator_updates { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } if let Some(ref v) = self.consensus_param_updates.as_ref() { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -7328,7 +7974,7 @@ impl ::protobuf::Message for ResponseEndBlock { os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -7364,39 +8010,51 @@ 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>( + 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>( + |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>( + |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() - ) - }) - } + |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) } } @@ -7421,7 +8079,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseEndBlock { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ResponseCommit { // message fields pub data: ::std::vec::Vec, @@ -7444,7 +8102,6 @@ impl ResponseCommit { // bytes data = 2; - pub fn get_data(&self) -> &[u8] { &self.data } @@ -7470,7 +8127,6 @@ impl ResponseCommit { // int64 retain_height = 3; - pub fn get_retain_height(&self) -> i64 { self.retain_height } @@ -7489,23 +8145,33 @@ impl ::protobuf::Message for ResponseCommit { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 2 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?; - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.retain_height = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -7519,14 +8185,21 @@ impl ::protobuf::Message for ResponseCommit { my_size += ::protobuf::rt::bytes_size(2, &self.data); } if self.retain_height != 0 { - my_size += ::protobuf::rt::value_size(3, self.retain_height, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 3, + self.retain_height, + ::protobuf::wire_format::WireTypeVarint, + ); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.data.is_empty() { os.write_bytes(2, &self.data)?; } @@ -7568,34 +8241,37 @@ 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) } } @@ -7619,7 +8295,7 @@ impl ::protobuf::reflect::ProtobufValue for ResponseCommit { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ConsensusParams { // message fields pub block: ::protobuf::SingularPtrField, @@ -7643,9 +8319,10 @@ impl ConsensusParams { // .tendermint.abci.types.BlockParams block = 1; - 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(); @@ -7676,9 +8353,10 @@ impl ConsensusParams { // .tendermint.abci.types.EvidenceParams evidence = 2; - 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(); @@ -7704,14 +8382,17 @@ impl ConsensusParams { // Take field pub fn take_evidence(&mut self) -> EvidenceParams { - self.evidence.take().unwrap_or_else(|| EvidenceParams::new()) + self.evidence + .take() + .unwrap_or_else(|| EvidenceParams::new()) } // .tendermint.abci.types.ValidatorParams validator = 3; - 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(); @@ -7737,7 +8418,9 @@ impl ConsensusParams { // Take field pub fn take_validator(&mut self) -> ValidatorParams { - self.validator.take().unwrap_or_else(|| ValidatorParams::new()) + self.validator + .take() + .unwrap_or_else(|| ValidatorParams::new()) } } @@ -7747,36 +8430,44 @@ impl ::protobuf::Message for ConsensusParams { if !v.is_initialized() { return false; } - }; + } for v in &self.evidence { if !v.is_initialized() { return false; } - }; + } for v in &self.validator { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.block)?; - }, + } 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.evidence)?; - }, + } 3 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.validator)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -7803,7 +8494,10 @@ impl ::protobuf::Message for ConsensusParams { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.block.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -7854,39 +8548,51 @@ 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>( + 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>( + |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>( + |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() - ) - }) - } + |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) } } @@ -7911,7 +8617,7 @@ impl ::protobuf::reflect::ProtobufValue for ConsensusParams { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct BlockParams { // message fields pub max_bytes: i64, @@ -7934,7 +8640,6 @@ impl BlockParams { // int64 max_bytes = 1; - pub fn get_max_bytes(&self) -> i64 { self.max_bytes } @@ -7949,7 +8654,6 @@ impl BlockParams { // int64 max_gas = 2; - pub fn get_max_gas(&self) -> i64 { self.max_gas } @@ -7968,27 +8672,39 @@ impl ::protobuf::Message for BlockParams { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.max_bytes = tmp; - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.max_gas = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -7999,17 +8715,28 @@ impl ::protobuf::Message for BlockParams { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.max_bytes != 0 { - my_size += ::protobuf::rt::value_size(1, self.max_bytes, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 1, + self.max_bytes, + ::protobuf::wire_format::WireTypeVarint, + ); } if self.max_gas != 0 { - my_size += ::protobuf::rt::value_size(2, self.max_gas, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 2, + self.max_gas, + ::protobuf::wire_format::WireTypeVarint, + ); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.max_bytes != 0 { os.write_int64(1, self.max_bytes)?; } @@ -8051,34 +8778,37 @@ 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) } } @@ -8102,7 +8832,7 @@ impl ::protobuf::reflect::ProtobufValue for BlockParams { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct EvidenceParams { // message fields pub max_age_num_blocks: i64, @@ -8125,7 +8855,6 @@ impl EvidenceParams { // int64 max_age_num_blocks = 1; - pub fn get_max_age_num_blocks(&self) -> i64 { self.max_age_num_blocks } @@ -8140,9 +8869,10 @@ impl EvidenceParams { // .google.protobuf.Duration max_age_duration = 2; - 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(); @@ -8168,7 +8898,9 @@ impl EvidenceParams { // Take field pub fn take_max_age_duration(&mut self) -> ::protobuf::well_known_types::Duration { - self.max_age_duration.take().unwrap_or_else(|| ::protobuf::well_known_types::Duration::new()) + self.max_age_duration + .take() + .unwrap_or_else(|| ::protobuf::well_known_types::Duration::new()) } } @@ -8178,27 +8910,41 @@ impl ::protobuf::Message for EvidenceParams { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.max_age_num_blocks = tmp; - }, + } 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.max_age_duration)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.max_age_duration, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -8209,7 +8955,11 @@ impl ::protobuf::Message for EvidenceParams { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.max_age_num_blocks != 0 { - my_size += ::protobuf::rt::value_size(1, self.max_age_num_blocks, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 1, + self.max_age_num_blocks, + ::protobuf::wire_format::WireTypeVarint, + ); } if let Some(ref v) = self.max_age_duration.as_ref() { let len = v.compute_size(); @@ -8220,7 +8970,10 @@ impl ::protobuf::Message for EvidenceParams { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.max_age_num_blocks != 0 { os.write_int64(1, self.max_age_num_blocks)?; } @@ -8264,34 +9017,39 @@ 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>>( + 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() - ) - }) - } + |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) } } @@ -8315,7 +9073,7 @@ impl ::protobuf::reflect::ProtobufValue for EvidenceParams { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ValidatorParams { // message fields pub pub_key_types: ::protobuf::RepeatedField<::std::string::String>, @@ -8337,7 +9095,6 @@ impl ValidatorParams { // repeated string pub_key_types = 1; - pub fn get_pub_key_types(&self) -> &[::std::string::String] { &self.pub_key_types } @@ -8366,16 +9123,28 @@ impl ::protobuf::Message for ValidatorParams { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.pub_key_types)?; - }, + ::protobuf::rt::read_repeated_string_into( + wire_type, + is, + &mut self.pub_key_types, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -8387,16 +9156,19 @@ impl ::protobuf::Message for ValidatorParams { let mut my_size = 0; for value in &self.pub_key_types { my_size += ::protobuf::rt::string_size(1, &value); - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.pub_key_types { os.write_string(1, &v)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -8432,29 +9204,31 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -8477,7 +9251,7 @@ impl ::protobuf::reflect::ProtobufValue for ValidatorParams { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct LastCommitInfo { // message fields pub round: i32, @@ -8500,7 +9274,6 @@ impl LastCommitInfo { // int32 round = 1; - pub fn get_round(&self) -> i32 { self.round } @@ -8515,7 +9288,6 @@ impl LastCommitInfo { // repeated .tendermint.abci.types.VoteInfo votes = 2; - pub fn get_votes(&self) -> &[VoteInfo] { &self.votes } @@ -8545,27 +9317,37 @@ impl ::protobuf::Message for LastCommitInfo { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.round = tmp; - }, + } 2 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.votes)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -8576,18 +9358,22 @@ impl ::protobuf::Message for LastCommitInfo { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.round != 0 { - my_size += ::protobuf::rt::value_size(1, self.round, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(1, self.round, ::protobuf::wire_format::WireTypeVarint); } for value in &self.votes { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.round != 0 { os.write_int32(1, self.round)?; } @@ -8595,7 +9381,7 @@ impl ::protobuf::Message for LastCommitInfo { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -8631,34 +9417,39 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -8682,7 +9473,7 @@ impl ::protobuf::reflect::ProtobufValue for LastCommitInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Event { // message fields pub field_type: ::std::string::String, @@ -8705,7 +9496,6 @@ impl Event { // string type = 1; - pub fn get_field_type(&self) -> &str { &self.field_type } @@ -8731,7 +9521,6 @@ impl Event { // repeated .tendermint.libs.kv.Pair attributes = 2; - pub fn get_attributes(&self) -> &[super::types::Pair] { &self.attributes } @@ -8761,23 +9550,39 @@ impl ::protobuf::Message for Event { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.field_type, + )?; + } 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attributes)?; - }, + ::protobuf::rt::read_repeated_message_into( + wire_type, + is, + &mut self.attributes, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -8793,13 +9598,16 @@ impl ::protobuf::Message for Event { for value in &self.attributes { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.field_type.is_empty() { os.write_string(1, &self.field_type)?; } @@ -8807,7 +9615,7 @@ impl ::protobuf::Message for Event { os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -8843,34 +9651,39 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -8894,7 +9707,7 @@ impl ::protobuf::reflect::ProtobufValue for Event { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Header { // message fields pub version: ::protobuf::SingularPtrField, @@ -8929,9 +9742,10 @@ impl Header { // .tendermint.abci.types.Version version = 1; - 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(); @@ -8962,7 +9776,6 @@ impl Header { // string chain_id = 2; - pub fn get_chain_id(&self) -> &str { &self.chain_id } @@ -8988,7 +9801,6 @@ impl Header { // int64 height = 3; - pub fn get_height(&self) -> i64 { self.height } @@ -9003,9 +9815,10 @@ impl Header { // .google.protobuf.Timestamp time = 4; - 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(); @@ -9031,14 +9844,17 @@ impl Header { // Take field pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp { - self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + self.time + .take() + .unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) } // .tendermint.abci.types.BlockID last_block_id = 5; - 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(); @@ -9069,7 +9885,6 @@ impl Header { // bytes last_commit_hash = 6; - pub fn get_last_commit_hash(&self) -> &[u8] { &self.last_commit_hash } @@ -9095,7 +9910,6 @@ impl Header { // bytes data_hash = 7; - pub fn get_data_hash(&self) -> &[u8] { &self.data_hash } @@ -9121,7 +9935,6 @@ impl Header { // bytes validators_hash = 8; - pub fn get_validators_hash(&self) -> &[u8] { &self.validators_hash } @@ -9147,7 +9960,6 @@ impl Header { // bytes next_validators_hash = 9; - pub fn get_next_validators_hash(&self) -> &[u8] { &self.next_validators_hash } @@ -9173,7 +9985,6 @@ impl Header { // bytes consensus_hash = 10; - pub fn get_consensus_hash(&self) -> &[u8] { &self.consensus_hash } @@ -9199,7 +10010,6 @@ impl Header { // bytes app_hash = 11; - pub fn get_app_hash(&self) -> &[u8] { &self.app_hash } @@ -9225,7 +10035,6 @@ impl Header { // bytes last_results_hash = 12; - pub fn get_last_results_hash(&self) -> &[u8] { &self.last_results_hash } @@ -9251,7 +10060,6 @@ impl Header { // bytes evidence_hash = 13; - pub fn get_evidence_hash(&self) -> &[u8] { &self.evidence_hash } @@ -9277,7 +10085,6 @@ impl Header { // bytes proposer_address = 14; - pub fn get_proposer_address(&self) -> &[u8] { &self.proposer_address } @@ -9308,73 +10115,127 @@ impl ::protobuf::Message for Header { if !v.is_initialized() { return false; } - }; + } for v in &self.time { if !v.is_initialized() { return false; } - }; + } for v in &self.last_block_id { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.version)?; - }, + } 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.chain_id)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.chain_id, + )?; + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.height = tmp; - }, + } 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.time)?; - }, + } 5 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.last_block_id)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.last_block_id, + )?; + } 6 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_commit_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.last_commit_hash, + )?; + } 7 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.data_hash, + )?; + } 8 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.validators_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.validators_hash, + )?; + } 9 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.next_validators_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.next_validators_hash, + )?; + } 10 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.consensus_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.consensus_hash, + )?; + } 11 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.app_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.app_hash, + )?; + } 12 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.last_results_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.last_results_hash, + )?; + } 13 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.evidence_hash)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.evidence_hash, + )?; + } 14 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.proposer_address)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.proposer_address, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -9392,7 +10253,8 @@ impl ::protobuf::Message for Header { my_size += ::protobuf::rt::string_size(2, &self.chain_id); } if self.height != 0 { - my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint); } if let Some(ref v) = self.time.as_ref() { let len = v.compute_size(); @@ -9434,7 +10296,10 @@ impl ::protobuf::Message for Header { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.version.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -9518,94 +10383,135 @@ 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>( + 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>( + |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() - ) - }) - } + |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) } } @@ -9641,7 +10547,7 @@ impl ::protobuf::reflect::ProtobufValue for Header { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Version { // message fields pub Block: u64, @@ -9664,7 +10570,6 @@ impl Version { // uint64 Block = 1; - pub fn get_Block(&self) -> u64 { self.Block } @@ -9679,7 +10584,6 @@ impl Version { // uint64 App = 2; - pub fn get_App(&self) -> u64 { self.App } @@ -9698,27 +10602,39 @@ impl ::protobuf::Message for Version { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint64()?; self.Block = tmp; - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_uint64()?; self.App = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -9729,17 +10645,22 @@ impl ::protobuf::Message for Version { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.Block != 0 { - my_size += ::protobuf::rt::value_size(1, self.Block, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(1, self.Block, ::protobuf::wire_format::WireTypeVarint); } if self.App != 0 { - my_size += ::protobuf::rt::value_size(2, self.App, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(2, self.App, ::protobuf::wire_format::WireTypeVarint); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.Block != 0 { os.write_uint64(1, self.Block)?; } @@ -9781,34 +10702,35 @@ 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) } } @@ -9832,7 +10754,7 @@ impl ::protobuf::reflect::ProtobufValue for Version { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct BlockID { // message fields pub hash: ::std::vec::Vec, @@ -9855,7 +10777,6 @@ impl BlockID { // bytes hash = 1; - pub fn get_hash(&self) -> &[u8] { &self.hash } @@ -9881,9 +10802,10 @@ impl BlockID { // .tendermint.abci.types.PartSetHeader parts_header = 2; - 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(); @@ -9909,7 +10831,9 @@ impl BlockID { // Take field pub fn take_parts_header(&mut self) -> PartSetHeader { - self.parts_header.take().unwrap_or_else(|| PartSetHeader::new()) + self.parts_header + .take() + .unwrap_or_else(|| PartSetHeader::new()) } } @@ -9919,23 +10843,35 @@ impl ::protobuf::Message for BlockID { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?; - }, + } 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.parts_header)?; - }, + ::protobuf::rt::read_singular_message_into( + wire_type, + is, + &mut self.parts_header, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -9957,7 +10893,10 @@ impl ::protobuf::Message for BlockID { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.hash.is_empty() { os.write_bytes(1, &self.hash)?; } @@ -10001,34 +10940,39 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -10052,7 +10996,7 @@ impl ::protobuf::reflect::ProtobufValue for BlockID { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PartSetHeader { // message fields pub total: i32, @@ -10075,7 +11019,6 @@ impl PartSetHeader { // int32 total = 1; - pub fn get_total(&self) -> i32 { self.total } @@ -10090,7 +11033,6 @@ impl PartSetHeader { // bytes hash = 2; - pub fn get_hash(&self) -> &[u8] { &self.hash } @@ -10120,23 +11062,33 @@ impl ::protobuf::Message for PartSetHeader { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int32()?; self.total = tmp; - }, + } 2 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hash)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -10147,7 +11099,8 @@ impl ::protobuf::Message for PartSetHeader { fn compute_size(&self) -> u32 { let mut my_size = 0; if self.total != 0 { - my_size += ::protobuf::rt::value_size(1, self.total, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(1, self.total, ::protobuf::wire_format::WireTypeVarint); } if !self.hash.is_empty() { my_size += ::protobuf::rt::bytes_size(2, &self.hash); @@ -10157,7 +11110,10 @@ impl ::protobuf::Message for PartSetHeader { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if self.total != 0 { os.write_int32(1, self.total)?; } @@ -10199,34 +11155,37 @@ 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) } } @@ -10250,7 +11209,7 @@ impl ::protobuf::reflect::ProtobufValue for PartSetHeader { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Validator { // message fields pub address: ::std::vec::Vec, @@ -10273,7 +11232,6 @@ impl Validator { // bytes address = 1; - pub fn get_address(&self) -> &[u8] { &self.address } @@ -10299,7 +11257,6 @@ impl Validator { // int64 power = 3; - pub fn get_power(&self) -> i64 { self.power } @@ -10318,23 +11275,37 @@ impl ::protobuf::Message for Validator { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.address)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.address, + )?; + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.power = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -10348,14 +11319,18 @@ impl ::protobuf::Message for Validator { my_size += ::protobuf::rt::bytes_size(1, &self.address); } if self.power != 0 { - my_size += ::protobuf::rt::value_size(3, self.power, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(3, self.power, ::protobuf::wire_format::WireTypeVarint); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.address.is_empty() { os.write_bytes(1, &self.address)?; } @@ -10397,34 +11372,37 @@ 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) } } @@ -10448,7 +11426,7 @@ impl ::protobuf::reflect::ProtobufValue for Validator { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct ValidatorUpdate { // message fields pub pub_key: ::protobuf::SingularPtrField, @@ -10471,9 +11449,10 @@ impl ValidatorUpdate { // .tendermint.abci.types.PubKey pub_key = 1; - 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(); @@ -10504,7 +11483,6 @@ impl ValidatorUpdate { // int64 power = 2; - pub fn get_power(&self) -> i64 { self.power } @@ -10524,27 +11502,37 @@ impl ::protobuf::Message for ValidatorUpdate { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pub_key)?; - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.power = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -10559,14 +11547,18 @@ impl ::protobuf::Message for ValidatorUpdate { my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } if self.power != 0 { - my_size += ::protobuf::rt::value_size(2, self.power, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(2, self.power, ::protobuf::wire_format::WireTypeVarint); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.pub_key.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -10610,34 +11602,39 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -10661,7 +11658,7 @@ impl ::protobuf::reflect::ProtobufValue for ValidatorUpdate { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct VoteInfo { // message fields pub validator: ::protobuf::SingularPtrField, @@ -10684,9 +11681,10 @@ impl VoteInfo { // .tendermint.abci.types.Validator validator = 1; - 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(); @@ -10717,7 +11715,6 @@ impl VoteInfo { // bool signed_last_block = 2; - pub fn get_signed_last_block(&self) -> bool { self.signed_last_block } @@ -10737,27 +11734,37 @@ impl ::protobuf::Message for VoteInfo { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.validator)?; - }, + } 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_bool()?; self.signed_last_block = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -10779,7 +11786,10 @@ impl ::protobuf::Message for VoteInfo { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.validator.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -10823,34 +11833,39 @@ 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>( + 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() - ) - }) - } + |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) } } @@ -10874,7 +11889,7 @@ impl ::protobuf::reflect::ProtobufValue for VoteInfo { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct PubKey { // message fields pub field_type: ::std::string::String, @@ -10897,7 +11912,6 @@ impl PubKey { // string type = 1; - pub fn get_field_type(&self) -> &str { &self.field_type } @@ -10923,7 +11937,6 @@ impl PubKey { // bytes data = 2; - pub fn get_data(&self) -> &[u8] { &self.data } @@ -10953,19 +11966,31 @@ impl ::protobuf::Message for PubKey { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.field_type, + )?; + } 2 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -10986,7 +12011,10 @@ impl ::protobuf::Message for PubKey { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.field_type.is_empty() { os.write_string(1, &self.field_type)?; } @@ -11028,34 +12056,35 @@ 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) } } @@ -11079,7 +12108,7 @@ impl ::protobuf::reflect::ProtobufValue for PubKey { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Evidence { // message fields pub field_type: ::std::string::String, @@ -11105,7 +12134,6 @@ impl Evidence { // string type = 1; - pub fn get_field_type(&self) -> &str { &self.field_type } @@ -11131,9 +12159,10 @@ impl Evidence { // .tendermint.abci.types.Validator validator = 2; - 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(); @@ -11164,7 +12193,6 @@ impl Evidence { // int64 height = 3; - pub fn get_height(&self) -> i64 { self.height } @@ -11179,9 +12207,10 @@ impl Evidence { // .google.protobuf.Timestamp time = 4; - 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(); @@ -11207,12 +12236,13 @@ impl Evidence { // Take field pub fn take_time(&mut self) -> ::protobuf::well_known_types::Timestamp { - self.time.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) + self.time + .take() + .unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new()) } // int64 total_voting_power = 5; - pub fn get_total_voting_power(&self) -> i64 { self.total_voting_power } @@ -11232,45 +12262,61 @@ impl ::protobuf::Message for Evidence { if !v.is_initialized() { return false; } - }; + } for v in &self.time { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.field_type, + )?; + } 2 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.validator)?; - }, + } 3 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.height = tmp; - }, + } 4 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.time)?; - }, + } 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type( + wire_type, + )); } let tmp = is.read_int64()?; self.total_voting_power = tmp; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -11288,21 +12334,29 @@ impl ::protobuf::Message for Evidence { my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } if self.height != 0 { - my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint); + my_size += + ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint); } if let Some(ref v) = self.time.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } if self.total_voting_power != 0 { - my_size += ::protobuf::rt::value_size(5, self.total_voting_power, ::protobuf::wire_format::WireTypeVarint); + my_size += ::protobuf::rt::value_size( + 5, + self.total_voting_power, + ::protobuf::wire_format::WireTypeVarint, + ); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.field_type.is_empty() { os.write_string(1, &self.field_type)?; } @@ -11357,49 +12411,65 @@ 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>( + 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>>( + |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() - ) - }) - } + |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) } } @@ -11426,7 +12496,7 @@ impl ::protobuf::reflect::ProtobufValue for Evidence { } } -#[derive(Clone,PartialEq,Eq,Debug,Hash)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub enum CheckTxType { New = 0, Recheck = 1, @@ -11441,30 +12511,28 @@ impl ::protobuf::ProtobufEnum for CheckTxType { match value { 0 => ::std::option::Option::Some(CheckTxType::New), 1 => ::std::option::Option::Some(CheckTxType::Recheck), - _ => ::std::option::Option::None + _ => ::std::option::Option::None, } } fn values() -> &'static [Self] { - static values: &'static [CheckTxType] = &[ - CheckTxType::New, - CheckTxType::Recheck, - ]; + static values: &'static [CheckTxType] = &[CheckTxType::New, CheckTxType::Recheck]; values } 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(), + ) + }) } } -impl ::std::marker::Copy for CheckTxType { -} +impl ::std::marker::Copy for CheckTxType {} impl ::std::default::Default for CheckTxType { fn default() -> Self { @@ -11474,7 +12542,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)) } } @@ -11556,13 +12624,13 @@ static file_descriptor_proto_data: &'static [u8] = b"\ 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\ \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.tendermi\ - nt.abci.types.EventB\x18\xea\xde\x1f\x10events,omitempty\xc8\xde\x1f\0\ + nt.abci.types.EventB\x18\xc8\xde\x1f\0\xea\xde\x1f\x10events,omitempty\ \x12\x13\n\tcodespace\x18\x08\x20\x01(\tB\0:\0\"\xf0\x01\n\x10ResponseEn\ dBlock\x12G\n\x11validator_updates\x18\x01\x20\x03(\x0b2&.tendermint.abc\ i.types.ValidatorUpdateB\x04\xc8\xde\x1f\0\x12I\n\x17consensus_param_upd\ @@ -11583,53 +12651,51 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \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\ \x12\x0e\n\x04type\x18\x01\x20\x01(\tB\0\x12J\n\nattributes\x18\x02\x20\ - \x03(\x0b2\x18.tendermint.libs.kv.PairB\x1c\xc8\xde\x1f\0\xea\xde\x1f\ - \x14attributes,omitempty:\0\"\xcf\x03\n\x06Header\x125\n\x07version\x18\ - \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\ - \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\ - \x0f\n\x05total\x18\x01\x20\x01(\x05B\0\x12\x0e\n\x04hash\x18\x02\x20\ - \x01(\x0cB\0:\0\"1\n\tValidator\x12\x11\n\x07address\x18\x01\x20\x01(\ - \x0cB\0\x12\x0f\n\x05power\x18\x03\x20\x01(\x03B\0:\0\"Z\n\x0fValidatorU\ - pdate\x124\n\x07pub_key\x18\x01\x20\x01(\x0b2\x1d.tendermint.abci.types.\ - PubKeyB\x04\xc8\xde\x1f\0\x12\x0f\n\x05power\x18\x02\x20\x01(\x03B\0:\0\ - \"d\n\x08VoteInfo\x129\n\tvalidator\x18\x01\x20\x01(\x0b2\x20.tendermint\ - .abci.types.ValidatorB\x04\xc8\xde\x1f\0\x12\x1b\n\x11signed_last_block\ - \x18\x02\x20\x01(\x08B\0:\0\"*\n\x06PubKey\x12\x0e\n\x04type\x18\x01\x20\ - \x01(\tB\0\x12\x0e\n\x04data\x18\x02\x20\x01(\x0cB\0:\0\"\xbb\x01\n\x08E\ - vidence\x12\x0e\n\x04type\x18\x01\x20\x01(\tB\0\x129\n\tvalidator\x18\ - \x02\x20\x01(\x0b2\x20.tendermint.abci.types.ValidatorB\x04\xc8\xde\x1f\ - \0\x12\x10\n\x06height\x18\x03\x20\x01(\x03B\0\x122\n\x04time\x18\x04\ - \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\ + \x03(\x0b2\x18.tendermint.libs.kv.PairB\x1c\xea\xde\x1f\x14attributes,om\ + itempty\xc8\xde\x1f\0:\0\"\xcf\x03\n\x06Header\x125\n\x07version\x18\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\xc8\xde\x1f\0\x90\xdf\x1f\x01\ + \x12;\n\rlast_block_id\x18\x05\x20\x01(\x0b2\x1e.tendermint.abci.types.B\ + lockIDB\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\x0fvalida\ + tors_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_has\ + h\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\x07Versio\ + n\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$.tendermint.abci.types.P\ + artSetHeaderB\x04\xc8\xde\x1f\0:\0\"2\n\rPartSetHeader\x12\x0f\n\x05tota\ + l\x18\x01\x20\x01(\x05B\0\x12\x0e\n\x04hash\x18\x02\x20\x01(\x0cB\0:\0\"\ + 1\n\tValidator\x12\x11\n\x07address\x18\x01\x20\x01(\x0cB\0\x12\x0f\n\ + \x05power\x18\x03\x20\x01(\x03B\0:\0\"Z\n\x0fValidatorUpdate\x124\n\x07p\ + ub_key\x18\x01\x20\x01(\x0b2\x1d.tendermint.abci.types.PubKeyB\x04\xc8\ + \xde\x1f\0\x12\x0f\n\x05power\x18\x02\x20\x01(\x03B\0:\0\"d\n\x08VoteInf\ + o\x129\n\tvalidator\x18\x01\x20\x01(\x0b2\x20.tendermint.abci.types.Vali\ + datorB\x04\xc8\xde\x1f\0\x12\x1b\n\x11signed_last_block\x18\x02\x20\x01(\ + \x08B\0:\0\"*\n\x06PubKey\x12\x0e\n\x04type\x18\x01\x20\x01(\tB\0\x12\ + \x0e\n\x04data\x18\x02\x20\x01(\x0cB\0:\0\"\xbb\x01\n\x08Evidence\x12\ + \x0e\n\x04type\x18\x01\x20\x01(\tB\0\x129\n\tvalidator\x18\x02\x20\x01(\ + \x0b2\x20.tendermint.abci.types.ValidatorB\x04\xc8\xde\x1f\0\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\ + \x1c\n\x12total_voting_power\x18\x05\x20\x01(\x03B\0:\0*%\n\x0bCheckTxTy\ + pe\x12\x07\n\x03New\x10\0\x12\x0b\n\x07Recheck\x10\x01\x1a\0B\x1c\xc8\ + \xe2\x1e\x01\xf8\xe1\x1e\x01\xd0\xe2\x1e\x01\xa8\xe2\x1e\x01\xb8\xe2\x1e\ + \x01\xc0\xe3\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/messages/merkle.rs b/src/messages/merkle.rs index 22d7b3e..2b6581a 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,19 +15,15 @@ #![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)] +#[derive(PartialEq, Clone, Default)] pub struct ProofOp { // message fields pub field_type: ::std::string::String, @@ -51,7 +47,6 @@ impl ProofOp { // string type = 1; - pub fn get_field_type(&self) -> &str { &self.field_type } @@ -77,7 +72,6 @@ impl ProofOp { // bytes key = 2; - pub fn get_key(&self) -> &[u8] { &self.key } @@ -103,7 +97,6 @@ impl ProofOp { // bytes data = 3; - pub fn get_data(&self) -> &[u8] { &self.data } @@ -133,22 +126,34 @@ impl ::protobuf::Message for ProofOp { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?; - }, + ::protobuf::rt::read_singular_proto3_string_into( + wire_type, + is, + &mut self.field_type, + )?; + } 2 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.key)?; - }, + } 3 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -172,7 +177,10 @@ impl ::protobuf::Message for ProofOp { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.field_type.is_empty() { os.write_string(1, &self.field_type)?; } @@ -217,39 +225,43 @@ 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) } } @@ -274,7 +286,7 @@ impl ::protobuf::reflect::ProtobufValue for ProofOp { } } -#[derive(PartialEq,Clone,Default)] +#[derive(PartialEq, Clone, Default)] pub struct Proof { // message fields pub ops: ::protobuf::RepeatedField, @@ -296,7 +308,6 @@ impl Proof { // repeated .tendermint.crypto.merkle.ProofOp ops = 1; - pub fn get_ops(&self) -> &[ProofOp] { &self.ops } @@ -326,20 +337,28 @@ impl ::protobuf::Message for Proof { if !v.is_initialized() { return false; } - }; + } true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.ops)?; - }, + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -352,18 +371,21 @@ impl ::protobuf::Message for Proof { for value in &self.ops { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; + } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { for v in &self.ops { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; - }; + } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } @@ -399,29 +421,27 @@ 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 +469,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\xe0\xe2\x1e\x01\xf8\xe1\x1e\x01\xa8\ + \xe2\x1e\x01\xd0\xe2\x1e\x01\xc8\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..52ec550 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,19 +15,15 @@ #![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)] +#[derive(PartialEq, Clone, Default)] pub struct Pair { // message fields pub key: ::std::vec::Vec, @@ -50,7 +46,6 @@ impl Pair { // bytes key = 1; - pub fn get_key(&self) -> &[u8] { &self.key } @@ -76,7 +71,6 @@ impl Pair { // bytes value = 2; - pub fn get_value(&self) -> &[u8] { &self.value } @@ -106,19 +100,31 @@ impl ::protobuf::Message for Pair { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn merge_from( + &mut self, + is: &mut ::protobuf::CodedInputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.key)?; - }, + } 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?; - }, + ::protobuf::rt::read_singular_proto3_bytes_into( + wire_type, + is, + &mut self.value, + )?; + } _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, + ::protobuf::rt::read_unknown_or_skip_group( + field_number, + wire_type, + is, + self.mut_unknown_fields(), + )?; + } }; } ::std::result::Result::Ok(()) @@ -139,7 +145,10 @@ impl ::protobuf::Message for Pair { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes( + &self, + os: &mut ::protobuf::CodedOutputStream<'_>, + ) -> ::protobuf::ProtobufResult<()> { if !self.key.is_empty() { os.write_bytes(1, &self.key)?; } @@ -181,34 +190,33 @@ 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 +243,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\xf8\xe1\x1e\x01\xa8\xe2\x1e\x01\xb8\xe2\x1e\x01\xc0\xe3\x1e\ + \x01\xd0\xe2\x1e\x01\xe0\xe2\x1e\x01\xc8\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