diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5192a81 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,35 @@ +# CHANGELOG + +*August 23, 2019* + +Special thanks to external contributors on this release: @amanusk, @marbar3778 + +## v0.6.1 + +### BREAKING CHANGES: + +### FEATURES: + +### IMPROVEMENTS: + +- [\#84](https://github.com/tendermint/rust-abci/pull/84): Fix warning for dynamic trait objects + +- [\#80](https://github.com/tendermint/rust-abci/pull/80): Reduce amount of logs under `info` + +### BUG FIXES: + +*July 1, 2019* + +Special thanks to external contributors on this release: @liamsi + +## v0.6.0 + +### BREAKING CHANGES: + +- [\#79](https://github.com/tendermint/rust-abci/pull/79): Tendermint 0.32.\*'s ABCI compatibility + +### FEATURES: + +### IMPROVEMENTS: + +### BUG FIXES: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 331678a..fceadc3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,64 +4,96 @@ Thank you for taking the time to contribute to our organization and this reposit Please follow standard github best practices: fork the repo, branch from the tip of develop, make some commits, and submit a pull request to develop. See the open (issues)[https://github.com/tendermint/rust-abci/issues] for things to contribute. -## Code of Conduct +## Code of Conduct + --- + All contributors are expected to follow (Code of Conduct)[./CODE_OF_CONDUCT.md] ## Feature requests and bug reports ---- + +--- + Feature requests or bug reports can be posted as a (Github issue)[https://github.com/tendermint/rust-abci/issues/new]. In the issue, please follow the template and describe to the best of your ability what you did, what you expected and what happened instead. If you'd like to solve a issue, please comment that you would like to claim the issue. This makes sure that no one else will work on it. ## Forking + --- Once you have a issue that you would to work on and commented on it to claim it: -* Fork the repository to your Github account. -* Clone your fork to your local machine -* Create a local branch `git checkout -b `. -* Commit & push your changes to your branch on github. -* Make sure that you are working off the most recent version, if not, pull the develop branch and rebase your committed history. -* Before opening a pull request read the [development section](#development) -* Open a [Pull Request](#pull-requests) for others to review the branch. - +- Fork the repository to your Github account. +- Clone your fork to your local machine +- Create a local branch `git checkout -b `. +- Commit & push your changes to your branch on github. +- Make sure that you are working off the most recent version, if not, pull the develop branch and rebase your committed history. +- Before opening a pull request read the [development section](#development) +- Open a [Pull Request](#pull-requests) for others to review the branch. ## Pull Requests + --- -To accommodate review process we suggest that PRs are categorically broken up. Ideally each PR addresses only a single issue. Additionally, as much as possible code refactoring and cleanup should be submitted as a separate PRs from bugfixes/feature-additions. +To accommodate review process we suggest that PRs are categorically broken up. Ideally each PR addresses only a single issue. Additionally, as much as possible code refactoring and cleanup should be submitted as a separate PRs from bugfixes/feature-additions. -If you are working on a issue and plan on contributing, please submit your PR early and make sure its opened as a `Draft`, even if it's incomplete, this indicates to the community you're working on something and allows them to provide comments early in the development process. When the code is complete it should be marked using Github's `Mark Ready` feature. This will let the maintainers know that there is a open PR for review. +If you are working on a issue and plan on contributing, please submit your PR early and make sure its opened as a `Draft`, even if it's incomplete, this indicates to the community you're working on something and allows them to provide comments early in the development process. When the code is complete it should be marked using Github's `Mark Ready` feature. This will let the maintainers know that there is a open PR for review. ## Development + --- -The code should follow [Rust Style Guide](https://github.com/rust-lang/rfcs/tree/master/style-guide). Much of the code style is captured by `rustfmt`. +The code should follow [Rust Style Guide](https://github.com/rust-lang/rfcs/tree/master/style-guide). Much of the code style is captured by `rustfmt`. Before opening a Pull Request please run the checks below: -* Install rustfmt: `rustup component add rustfmt` -* Install clippy: `rustup component add clippy` +- Install rustfmt: `rustup component add rustfmt` +- Install clippy: `rustup component add clippy` -### Testing +### Testing -Run the test suite with +Run the test suite with -```cargo test --all-features``` +`cargo test --all-features` ### Format checking (rustfmt) Make sure your code is well-formatted by running -```cargo fmt``` +`cargo fmt` ### Lint (clippy) Lint your code (i.e. check it for common issues) with: -```cargo clippy``` +`cargo clippy` + +## Changelog + +Every fix, improvement, feature, or breaking change should be made in a +pull-request that includes an update to the `CHANGELOG.md` file. + +Changelog entries should be formatted as follows: + +``` +- \#xxx Some description about the change (@contributor) +``` + +Here, `xxx` is the pull-request number, and `contributor` +is the author/s of the change. + +It's also acceptable for `xxx` to refer to the relevent issue number, but pull-request +numbers are preferred. +Note this means pull-requests should be opened first so the changelog can then +be updated with the pull-request's number. +There is no need to include the full link, as this will be added +automatically during release. But please include the backslash and pound, eg. `\#2313`. + +Changelog entries should be numerically according to the pull-request number. + +Changes with multiple classifications should be doubly included (eg. a bug fix +that is also a breaking change should be recorded under both). ## License @@ -77,4 +109,4 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file +limitations under the License. diff --git a/Cargo.toml b/Cargo.toml index a4429d1..dec45ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,11 @@ [package] name = "abci" -version = "0.6.0" +version = "0.6.1" authors = ["Adrian Brink ", "Jackson Lewis ", "Dave Bryson", "Tomas Tauber"] +edition = "2018" license = "MIT/Apache-2.0" description = "Tendermint ABCI server for Rust" -homepage = "https://tendermint.com/docs/guides/app-development" +homepage = "https://tendermint.com/docs/spec/abci/" repository = "https://github.com/tendermint/rust-abci" keywords = ["abci", "tendermint", "blockchain", "rust"] readme = "README.md" @@ -12,13 +13,13 @@ include = ["src/**/*", "Cargo.toml"] [dependencies] bytes = "0.4" -protobuf = "2.6.2" -byteorder = "1.2.7" +protobuf = "2.8" +byteorder = "1.3.2" integer-encoding = "1.0.5" -log = "0.4.6" -env_logger = "0.6.1" +log = "0.4.8" +env_logger = "0.6.2" tokio = "0.1" futures = "0.1" [build-dependencies] -protobuf-codegen-pure = "2.6.2" +protobuf-codegen-pure = "2.8" diff --git a/README.md b/README.md index f758967..3cd8c2a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Tendermint ABCI server, written in Rust programming language. [![Current Version](https://meritbadge.herokuapp.com/abci)](https://crates.io/crates/abci) -[![](https://tokei.rs/b1/github/tendermint/rust-abci)](https://github.com/tendermint/rust-abci) +[![](https://tokei.rs/b1/github/tendermint/rust-abci)](https://github.com/tendermint/rust-abci) [![CircleCI](https://circleci.com/gh/tendermint/rust-abci/tree/master.svg?style=shield)](https://circleci.com/gh/tendermint/rust-abci/tree/master) This library implements the [ABCI @@ -32,12 +32,12 @@ To use this library to build your own ABCI apps in Rust you have to include the ```toml [dependencies] -abci = "0.4.3" +abci = "0.6.1" ``` ### Development -This crate already contains the compiled ABCI protobuf messages. If you want to update protobuf messages to a newer version of Tendermint. Run `make update-proto` +This crate already contains the compiled ABCI protobuf messages. If you want to update protobuf messages to a newer version of Tendermint. Run `make update-proto` ## Running the examples @@ -60,6 +60,13 @@ curl localhost:26657/broadcast_tx_commit?tx=0x02 For a real life example of an ABCI application you can checkout [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) or [Ethermint](https://github.com/cosmos/ethermint). +#### Tendermint Compatibility Table + +| Tendermint | Rust-abci | +| ---------- | :-------: | +| 0.32.2 | 0.6.1 | +| 0.31.7 | 0.5.4 | + ## Documentation Coming soon! diff --git a/src/codec.rs b/src/codec.rs index 3c963c0..b40ad75 100644 --- a/src/codec.rs +++ b/src/codec.rs @@ -5,7 +5,7 @@ use integer_encoding::VarInt; use protobuf::Message; use tokio::codec::{Decoder, Encoder}; -use messages::abci::*; +use crate::messages::abci::*; #[derive(Debug)] pub struct ABCICodec; @@ -18,9 +18,9 @@ impl ABCICodec { impl Decoder for ABCICodec { type Item = Request; - type Error = Box; + type Error = Box; - fn decode(&mut self, buf: &mut BytesMut) -> Result, Box> { + fn decode(&mut self, buf: &mut BytesMut) -> Result, Box> { let length = buf.len(); if length == 0 { return Ok(None); @@ -37,9 +37,9 @@ impl Decoder for ABCICodec { impl Encoder for ABCICodec { type Item = Response; - type Error = Box; + type Error = Box; - fn encode(&mut self, msg: Response, buf: &mut BytesMut) -> Result<(), Box> { + fn encode(&mut self, msg: Response, buf: &mut BytesMut) -> Result<(), Box> { let msg_len = msg.compute_size(); let varint = i64::encode_var_vec(i64::from(msg_len)); @@ -60,7 +60,7 @@ impl Encoder for ABCICodec { mod tests { use super::*; - fn setup_echo_request_buf() -> Result> { + fn setup_echo_request_buf() -> Result> { let buf = &mut BytesMut::new(); let mut r = Request::new(); @@ -78,7 +78,7 @@ mod tests { Ok(buf.take()) } - fn setup_echo_large_request_buf() -> Result> { + fn setup_echo_large_request_buf() -> Result> { let buf = &mut BytesMut::new(); let mut r = Request::new(); diff --git a/src/lib.rs b/src/lib.rs index c23e0cf..880c348 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,10 +32,10 @@ extern crate tokio; use std::net::SocketAddr; -pub use messages::abci::*; -pub use messages::merkle::*; -pub use messages::types::*; -use server::serve; +pub use crate::messages::abci::*; +pub use crate::messages::merkle::*; +pub use crate::messages::types::*; +use crate::server::serve; mod codec; mod messages; diff --git a/src/messages/abci.rs b/src/messages/abci.rs index 1c18e19..3c400e9 100644 --- a/src/messages/abci.rs +++ b/src/messages/abci.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.6.2. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![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_8_0; + #[derive(PartialEq,Clone,Default)] pub struct Request { // message oneof groups @@ -867,13 +872,13 @@ impl ::protobuf::Message for Request { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1096,13 +1101,13 @@ impl ::protobuf::Message for RequestEcho { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1228,13 +1233,13 @@ impl ::protobuf::Message for RequestFlush { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1449,13 +1454,13 @@ impl ::protobuf::Message for RequestInfo { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -1666,13 +1671,13 @@ impl ::protobuf::Message for RequestSetOption { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2022,13 +2027,13 @@ impl ::protobuf::Message for RequestInitChain { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2309,13 +2314,13 @@ impl ::protobuf::Message for RequestQuery { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2641,13 +2646,13 @@ impl ::protobuf::Message for RequestBeginBlock { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2828,13 +2833,13 @@ impl ::protobuf::Message for RequestCheckTx { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -2997,13 +3002,13 @@ impl ::protobuf::Message for RequestDeliverTx { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3159,13 +3164,13 @@ impl ::protobuf::Message for RequestEndBlock { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -3291,13 +3296,13 @@ impl ::protobuf::Message for RequestCommit { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4271,13 +4276,13 @@ impl ::protobuf::Message for Response { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4506,13 +4511,13 @@ impl ::protobuf::Message for ResponseException { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4675,13 +4680,13 @@ impl ::protobuf::Message for ResponseEcho { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -4807,13 +4812,13 @@ impl ::protobuf::Message for ResponseFlush { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5100,13 +5105,13 @@ impl ::protobuf::Message for ResponseInfo { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5358,13 +5363,13 @@ impl ::protobuf::Message for ResponseSetOption { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -5597,13 +5602,13 @@ impl ::protobuf::Message for ResponseInitChain { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -6054,13 +6059,13 @@ impl ::protobuf::Message for ResponseQuery { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -6278,13 +6283,13 @@ impl ::protobuf::Message for ResponseBeginBlock { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -6685,13 +6690,13 @@ impl ::protobuf::Message for ResponseCheckTx { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -7134,13 +7139,13 @@ impl ::protobuf::Message for ResponseDeliverTx { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -7446,13 +7451,13 @@ impl ::protobuf::Message for ResponseEndBlock { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -7627,13 +7632,13 @@ impl ::protobuf::Message for ResponseCommit { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -7913,13 +7918,13 @@ impl ::protobuf::Message for ConsensusParams { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -8116,13 +8121,13 @@ impl ::protobuf::Message for BlockParams { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -8284,13 +8289,13 @@ impl ::protobuf::Message for EvidenceParams { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -8452,13 +8457,13 @@ impl ::protobuf::Message for ValidatorParams { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -8657,13 +8662,13 @@ impl ::protobuf::Message for LastCommitInfo { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -8875,13 +8880,13 @@ impl ::protobuf::Message for Event { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -9614,13 +9619,13 @@ impl ::protobuf::Message for Header { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -9895,13 +9900,13 @@ impl ::protobuf::Message for Version { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -10121,13 +10126,13 @@ impl ::protobuf::Message for BlockID { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -10325,13 +10330,13 @@ impl ::protobuf::Message for PartSetHeader { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -10529,13 +10534,13 @@ impl ::protobuf::Message for Validator { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -10748,13 +10753,13 @@ impl ::protobuf::Message for ValidatorUpdate { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -10967,13 +10972,13 @@ impl ::protobuf::Message for VoteInfo { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -11178,13 +11183,13 @@ impl ::protobuf::Message for PubKey { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -11513,13 +11518,13 @@ impl ::protobuf::Message for Evidence { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -11676,14 +11681,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \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\nga\ s_wanted\x18\x05\x20\x01(\x03B\0\x12\x12\n\x08gas_used\x18\x06\x20\x01(\ - \x03B\0\x125\n\x06events\x18\x07\x20\x03(\x0b2\x0b.abci.EventB\x18\xc8\ - \xde\x1f\0\xea\xde\x1f\x10events,omitempty\x12\x13\n\tcodespace\x18\x08\ + \x03B\0\x125\n\x06events\x18\x07\x20\x03(\x0b2\x0b.abci.EventB\x18\xea\ + \xde\x1f\x10events,omitempty\xc8\xde\x1f\0\x12\x13\n\tcodespace\x18\x08\ \x20\x01(\tB\0:\0\"\xca\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\x03\ log\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\x125\n\x06events\x18\x07\x20\x03(\x0b2\x0b.abci.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\"\xbd\x01\n\x10ResponseEndBlock\x126\n\x11vali\ dator_updates\x18\x01\x20\x03(\x0b2\x15.abci.ValidatorUpdateB\x04\xc8\ \xde\x1f\0\x128\n\x17consensus_param_updates\x18\x02\x20\x01(\x0b2\x15.a\ @@ -11700,12 +11705,12 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x12\x0f\n\x05round\x18\x01\x20\x01(\x05B\0\x12#\n\x05votes\x18\x02\x20\ \x03(\x0b2\x0e.abci.VoteInfoB\x04\xc8\xde\x1f\0:\0\"[\n\x05Event\x12\x0e\ \n\x04type\x18\x01\x20\x01(\tB\0\x12@\n\nattributes\x18\x02\x20\x03(\x0b\ - 2\x0e.common.KVPairB\x1c\xea\xde\x1f\x14attributes,omitempty\xc8\xde\x1f\ - \0:\0\"\xd5\x03\n\x06Header\x12$\n\x07version\x18\x01\x20\x01(\x0b2\r.ab\ + 2\x0e.common.KVPairB\x1c\xc8\xde\x1f\0\xea\xde\x1f\x14attributes,omitemp\ + ty:\0\"\xd5\x03\n\x06Header\x12$\n\x07version\x18\x01\x20\x01(\x0b2\r.ab\ ci.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\x11\n\x07num_txs\x18\x05\x20\x01(\x03\ + \x90\xdf\x1f\x01\xc8\xde\x1f\0\x12\x11\n\x07num_txs\x18\x05\x20\x01(\x03\ B\0\x12\x13\n\ttotal_txs\x18\x06\x20\x01(\x03B\0\x12*\n\rlast_block_id\ \x18\x07\x20\x01(\x0b2\r.abci.BlockIDB\x04\xc8\xde\x1f\0\x12\x1a\n\x10la\ st_commit_hash\x18\x08\x20\x01(\x0cB\0\x12\x13\n\tdata_hash\x18\t\x20\ @@ -11730,9 +11735,9 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \x18\x01\x20\x01(\tB\0\x12(\n\tvalidator\x18\x02\x20\x01(\x0b2\x0f.abci.\ 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:\0B\x1c\xa8\xe2\x1e\x01\xf8\xe1\x1e\x01\xc8\xe2\x1e\x01\ - \xb8\xe2\x1e\x01\xe0\xe2\x1e\x01\xc0\xe3\x1e\x01\xd0\xe2\x1e\x01b\x06pro\ + \xc8\xde\x1f\0\x90\xdf\x1f\x01\x12\x1c\n\x12total_voting_power\x18\x05\ + \x20\x01(\x03B\0:\0B\x1c\xe0\xe2\x1e\x01\xa8\xe2\x1e\x01\xd0\xe2\x1e\x01\ + \xc8\xe2\x1e\x01\xc0\xe3\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01b\x06pro\ to3\ "; diff --git a/src/messages/merkle.rs b/src/messages/merkle.rs index 114d2c4..5c47b31 100644 --- a/src/messages/merkle.rs +++ b/src/messages/merkle.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.6.2. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `github.com/tendermint/tendermint/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_8_0; + #[derive(PartialEq,Clone,Default)] pub struct ProofOp { // message fields @@ -192,13 +197,13 @@ impl ::protobuf::Message for ProofOp { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -380,13 +385,13 @@ impl ::protobuf::Message for Proof { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -455,8 +460,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\ rkle\":\n\x07ProofOp\x12\x0e\n\x04type\x18\x01\x20\x01(\tB\0\x12\r\n\x03\ key\x18\x02\x20\x01(\x0cB\0\x12\x0e\n\x04data\x18\x03\x20\x01(\x0cB\0:\0\ \"-\n\x05Proof\x12\"\n\x03ops\x18\x01\x20\x03(\x0b2\x0f.merkle.ProofOpB\ - \x04\xc8\xde\x1f\0:\0B\x14\xf8\xe1\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\ - \x01\xa8\xe2\x1e\x01\xc8\xe2\x1e\x01b\x06proto3\ + \x04\xc8\xde\x1f\0:\0B\x14\xd0\xe2\x1e\x01\xc8\xe2\x1e\x01\xa8\xe2\x1e\ + \x01\xf8\xe1\x1e\x01\xe0\xe2\x1e\x01b\x06proto3\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/src/messages/types.rs b/src/messages/types.rs index e07885e..f54849f 100644 --- a/src/messages/types.rs +++ b/src/messages/types.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.6.2. Do not edit +// This file is generated by rust-protobuf 2.8.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `github.com/tendermint/tendermint/libs/common/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_8_0; + #[derive(PartialEq,Clone,Default)] pub struct KVPair { // message fields @@ -156,13 +161,13 @@ impl ::protobuf::Message for KVPair { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -360,13 +365,13 @@ impl ::protobuf::Message for KI64Pair { &mut self.unknown_fields } - fn as_any(&self) -> &::std::any::Any { - self as &::std::any::Any + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) } - fn as_any_mut(&mut self) -> &mut ::std::any::Any { - self as &mut ::std::any::Any + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) } - fn into_any(self: Box) -> ::std::boxed::Box<::std::any::Any> { + fn into_any(self: Box) -> ::std::boxed::Box { self } @@ -440,9 +445,9 @@ static file_descriptor_proto_data: &'static [u8] = b"\ \n8github.com/tendermint/tendermint/libs/common/types.proto\x12\x06commo\ n\"*\n\x06KVPair\x12\r\n\x03key\x18\x01\x20\x01(\x0cB\0\x12\x0f\n\x05val\ ue\x18\x02\x20\x01(\x0cB\0:\0\",\n\x08KI64Pair\x12\r\n\x03key\x18\x01\ - \x20\x01(\x0cB\0\x12\x0f\n\x05value\x18\x02\x20\x01(\x03B\0:\0B\x1c\xf8\ - \xe1\x1e\x01\xa8\xe2\x1e\x01\xc0\xe3\x1e\x01\xb8\xe2\x1e\x01\xd0\xe2\x1e\ - \x01\xe0\xe2\x1e\x01\xc8\xe2\x1e\x01b\x06proto3\ + \x20\x01(\x0cB\0\x12\x0f\n\x05value\x18\x02\x20\x01(\x03B\0:\0B\x1c\xb8\ + \xe2\x1e\x01\xe0\xe2\x1e\x01\xa8\xe2\x1e\x01\xc8\xe2\x1e\x01\xd0\xe2\x1e\ + \x01\xc0\xe3\x1e\x01\xf8\xe1\x1e\x01b\x06proto3\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/src/server.rs b/src/server.rs index d00fb23..0aba324 100644 --- a/src/server.rs +++ b/src/server.rs @@ -9,9 +9,9 @@ use tokio::io; use tokio::net::TcpListener; use tokio::prelude::*; -use codec::ABCICodec; -use messages::abci::*; -use Application; +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<()> @@ -33,12 +33,12 @@ where let app_instance = Arc::clone(&app); let responses = reader.map(move |request| { - info!("Got Request! {:?}", request); + debug!("Got Request! {:?}", request); respond(&app_instance, &request) }); let writes = responses.fold(_writer, |writer, response| { - info!("Return Response! {:?}", response); + debug!("Return Response! {:?}", response); writer.send(response) }); tokio::spawn(writes.then(|_| Ok(())))