Skip to content

Commit

Permalink
Parse validators field in genesis api
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Nov 13, 2019
1 parent 10a3026 commit c7ece4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tendermint/src/genesis.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Genesis data

use crate::{chain, consensus, Hash, Time};
use crate::{chain, consensus, validator, Hash, Time};
use serde::{Deserialize, Serialize};

/// Genesis data
Expand All @@ -15,6 +15,9 @@ pub struct Genesis<AppState = serde_json::Value> {
/// Consensus parameters
pub consensus_params: consensus::Params,

/// Validators
pub validators: Vec<validator::Info>,

/// App hash
pub app_hash: Hash,

Expand Down
1 change: 1 addition & 0 deletions tendermint/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub struct Info {
pub pub_key: PublicKey,

/// Validator voting power
#[serde(alias = "power")]
pub voting_power: vote::Power,

/// Validator proposer priority
Expand Down

0 comments on commit c7ece4d

Please sign in to comment.