diff --git a/beacon_chain/types/src/deposit.rs b/beacon_chain/types/src/deposit.rs index 58e61c9cf..77724000f 100644 --- a/beacon_chain/types/src/deposit.rs +++ b/beacon_chain/types/src/deposit.rs @@ -1,4 +1,5 @@ use super::{Hash256}; +use super::deposit_data::DepositData; pub struct Deposit { pub merkle_branch: Vec, diff --git a/beacon_chain/types/src/deposit_data.rs b/beacon_chain/types/src/deposit_data.rs index 32a705d27..ce187d310 100644 --- a/beacon_chain/types/src/deposit_data.rs +++ b/beacon_chain/types/src/deposit_data.rs @@ -1,7 +1,7 @@ -use super::deposit_parameters::DepositParameters; +use super::deposit_input::DepositInput; pub struct DepositData { - pub deposit_parameter: DepositInput, + pub deposit_input: DepositInput, pub value: u64, pub timestamp: u64 } diff --git a/beacon_chain/types/src/deposit_input.rs b/beacon_chain/types/src/deposit_input.rs index d2db350ef..16526cec1 100644 --- a/beacon_chain/types/src/deposit_input.rs +++ b/beacon_chain/types/src/deposit_input.rs @@ -1,9 +1,9 @@ -use super::bls::{Keypair, PublicKey, AggregateSignature}; +use super::bls::{PublicKey, Signature}; use super::{Hash256}; -pub struct DepositParameters { +pub struct DepositInput { pub pubkey: PublicKey, pub withdrawal_credentials: Hash256, pub randao_commitment: Hash256, - pub proof_of_possession: AggregateSignature + pub proof_of_possession: Signature } diff --git a/beacon_chain/types/src/lib.rs b/beacon_chain/types/src/lib.rs index f87619fd5..d3a3543fa 100644 --- a/beacon_chain/types/src/lib.rs +++ b/beacon_chain/types/src/lib.rs @@ -12,6 +12,9 @@ pub mod candidate_pow_receipt_root_record; pub mod chain_config; pub mod crosslink_record; pub mod crystallized_state; +pub mod deposit; +pub mod deposit_data; +pub mod deposit_input; pub mod fork_data; pub mod pending_attestation_record; pub mod shard_and_committee; @@ -30,6 +33,9 @@ pub use beacon_state::BeaconState; pub use chain_config::ChainConfig; pub use crosslink_record::CrosslinkRecord; pub use crystallized_state::CrystallizedState; +pub use deposit::Deposit; +pub use deposit_data::DepositData; +pub use deposit_input::DepositInput; pub use fork_data::ForkData; pub use pending_attestation_record::PendingAttestationRecord; pub use shard_and_committee::ShardAndCommittee; diff --git a/beacon_chain/types/src/validator_record.rs b/beacon_chain/types/src/validator_record.rs index c68830f60..b8834131f 100644 --- a/beacon_chain/types/src/validator_record.rs +++ b/beacon_chain/types/src/validator_record.rs @@ -33,7 +33,7 @@ pub struct ValidatorRecord { pub randao_commitment: Hash256, pub randao_layers: u64, pub balance: u64, - pub status: u64, + pub status: ValidatorStatus, pub latest_status_change_slot: u64, pub exit_count: u64 } @@ -51,7 +51,7 @@ impl ValidatorRecord { randao_commitment: Hash256::zero(), randao_layers: 0, balance: 0, - status: 0, + status: From::from(0), latest_status_change_slot: 0, exit_count: 0 }; @@ -74,7 +74,7 @@ mod tests { assert!(v.randao_commitment.is_zero()); assert_eq!(v.randao_layers, 0); assert_eq!(v.balance, 0); - assert_eq!(v.status, 0); + assert_eq!(v.status, From::from(0)); assert_eq!(v.latest_status_change_slot, 0); assert_eq!(v.exit_count, 0); }