Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
liamsi committed Jul 12, 2020
1 parent 274bd7b commit ea9cd4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tendermint/src/lite_impl/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ fn encode_bytes(bytes: &[u8]) -> Vec<u8> {
} else {
vec![]
}

}

fn encode_hash(hash: &Hash) -> Vec<u8> {
Expand All @@ -82,8 +81,8 @@ fn encode_varint(val: u64) -> Vec<u8> {

#[cfg(test)]
mod test {
use crate::lite::Header as _;
use crate::block::Header;
use crate::lite::Header as _;
use crate::Hash;
use std::str::FromStr;

Expand Down Expand Up @@ -119,7 +118,9 @@ mod test {
// jq .result.signed_header.commit.block_id.hash
let header: Header = serde_json::from_str(json_data).unwrap();
let got_hash = header.hash();
let want_hash = Hash::from_str("F008EACA817CF6A3918CF7A6FD44F1F2464BB24D25A7EDB45A03E8783E9AB438").unwrap();
let want_hash =
Hash::from_str("F008EACA817CF6A3918CF7A6FD44F1F2464BB24D25A7EDB45A03E8783E9AB438")
.unwrap();

assert_eq!(got_hash, want_hash);
}
Expand Down

0 comments on commit ea9cd4e

Please sign in to comment.