Skip to content

Commit

Permalink
Change app_hash field type in Genesis to AppHash
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabaluev committed Nov 16, 2022
1 parent 0cafd74 commit 8c5565b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rpc/tests/kvstore_fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ fn incoming_fixtures() {
let result =
endpoint::genesis::Response::<Option<serde_json::Value>>::from_string(content)
.unwrap();
assert!(result.genesis.app_hash.is_empty());
assert!(result.genesis.app_hash.as_bytes().is_empty());
assert_eq!(result.genesis.chain_id.as_str(), CHAIN_ID);
assert_eq!(result.genesis.consensus_params.block.max_bytes, 22020096);
assert_eq!(result.genesis.consensus_params.block.max_gas, -1);
Expand Down
6 changes: 3 additions & 3 deletions tendermint/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use serde::{Deserialize, Serialize};

use crate::{chain, consensus, prelude::*, serializers, validator, Time};
use crate::{chain, consensus, prelude::*, serializers, validator, AppHash, Time};

/// Genesis data
#[derive(Clone, Debug, Serialize, Deserialize)]
Expand All @@ -25,8 +25,8 @@ pub struct Genesis<AppState = serde_json::Value> {
pub validators: Vec<validator::Info>,

/// App hash
#[serde(with = "serializers::bytes::hexstring")]
pub app_hash: Vec<u8>,
#[serde(with = "serializers::apphash")]
pub app_hash: AppHash,

/// App state
pub app_state: AppState,
Expand Down

0 comments on commit 8c5565b

Please sign in to comment.