Skip to content

Commit

Permalink
addressing more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
snaumov committed Aug 12, 2020
1 parent 135b0a5 commit 934901d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 16 additions & 14 deletions types/src/genesis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,39 @@ use serde::Serialize;
use vm::TokenAmount;

#[derive(Serialize)]
enum ActorType {
// Account,
// MultiSig,
pub enum ActorType {
Account,
MultiSig,
}

#[derive(Serialize)]
#[serde(rename_all = "PascalCase")]
pub struct Actor {
actor_type: ActorType,
pub actor_type: ActorType,
#[serde(with = "bigint_ser")]
token_amount: TokenAmount,
pub token_amount: TokenAmount,
}

#[derive(Serialize)]
#[serde(rename_all = "PascalCase")]
pub struct Miner {
owner: Address,
worker: Address,
peer_id: Vec<u8>,
pub owner: Address,
pub worker: Address,
pub peer_id: Vec<u8>,

#[serde(with = "bigint_ser")]
market_balance: TokenAmount,
pub market_balance: TokenAmount,
#[serde(with = "bigint_ser")]
power_balance: TokenAmount,
sector_size: SectorSize,
pub power_balance: TokenAmount,
pub sector_size: SectorSize,
}

#[derive(Serialize)]
#[serde(rename_all = "PascalCase")]
pub struct Template {
accounts: Vec<Actor>,
miners: Vec<Miner>,
network_name: String,
pub accounts: Vec<Actor>,
pub miners: Vec<Miner>,
pub network_name: String,
// timestamp: SystemTime,
}

Expand Down

0 comments on commit 934901d

Please sign in to comment.