From 56dc73fbd1d2686b5282070fba54cf70de0ac041 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 12 Dec 2018 18:35:31 +1100 Subject: [PATCH] Update some shard `u16` to `u64` This is pretty hacky, is just serving my purpose for `BeaconChain`. These structs will need to be fully updated to the latest spec. --- beacon_chain/types/src/validator_record.rs | 2 +- beacon_chain/types/src/validator_registration.rs | 2 +- beacon_chain/validator_induction/src/inductor.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/beacon_chain/types/src/validator_record.rs b/beacon_chain/types/src/validator_record.rs index 3a15baeec..692d81801 100644 --- a/beacon_chain/types/src/validator_record.rs +++ b/beacon_chain/types/src/validator_record.rs @@ -14,7 +14,7 @@ pub enum ValidatorStatus { #[derive(Debug, Clone, PartialEq)] pub struct ValidatorRecord { pub pubkey: PublicKey, - pub withdrawal_shard: u16, + pub withdrawal_shard: u64, pub withdrawal_address: Address, pub randao_commitment: Hash256, pub randao_last_change: u64, diff --git a/beacon_chain/types/src/validator_registration.rs b/beacon_chain/types/src/validator_registration.rs index 139885b1c..11f6d11c5 100644 --- a/beacon_chain/types/src/validator_registration.rs +++ b/beacon_chain/types/src/validator_registration.rs @@ -5,7 +5,7 @@ use bls::{create_proof_of_possession, Keypair, PublicKey, Signature}; #[derive(Debug, Clone, PartialEq)] pub struct ValidatorRegistration { pub pubkey: PublicKey, - pub withdrawal_shard: u16, + pub withdrawal_shard: u64, pub withdrawal_address: Address, pub randao_commitment: Hash256, pub proof_of_possession: Signature, diff --git a/beacon_chain/validator_induction/src/inductor.rs b/beacon_chain/validator_induction/src/inductor.rs index d26e71bc3..03a04e1ca 100644 --- a/beacon_chain/validator_induction/src/inductor.rs +++ b/beacon_chain/validator_induction/src/inductor.rs @@ -7,7 +7,7 @@ pub const DEPOSIT_GWEI: u64 = 32_000_000_000; /// Inducts validators into a `CrystallizedState`. pub struct ValidatorInductor { pub current_slot: u64, - pub shard_count: u16, + pub shard_count: u64, validators: Vec, empty_validator_start: usize, }