diff --git a/beacon_chain/types/src/chain_config.rs b/beacon_chain/types/src/chain_config.rs index 49128b49f..7437bed47 100644 --- a/beacon_chain/types/src/chain_config.rs +++ b/beacon_chain/types/src/chain_config.rs @@ -21,7 +21,7 @@ impl ChainConfig { pub fn standard() -> Self { Self { cycle_length: 64, - deposit_size_gwei: 32 * 10^9, + deposit_size_gwei: 32 * (10^9), shard_count: 1024, min_committee_size: 128, max_validator_churn_quotient: 32, @@ -36,7 +36,7 @@ impl ChainConfig { // shard_count / cycle_length > 0 otherwise validator delegation // will fail. - if self.shard_count / self.cycle_length as u16 == 0 { + if self.shard_count / u16::from(self.cycle_length) == 0 { return false; } @@ -49,7 +49,7 @@ impl ChainConfig { pub fn super_fast_tests() -> Self { Self { cycle_length: 2, - deposit_size_gwei: 32 * 10^9, + deposit_size_gwei: 32 * (10^9), shard_count: 2, min_committee_size: 2, max_validator_churn_quotient: 32, diff --git a/beacon_chain/types/src/special_record.rs b/beacon_chain/types/src/special_record.rs index 9189728df..186e449b1 100644 --- a/beacon_chain/types/src/special_record.rs +++ b/beacon_chain/types/src/special_record.rs @@ -49,7 +49,7 @@ impl SpecialRecord { /// Match `self.kind` to a `SpecialRecordKind`. /// /// Returns `None` if `self.kind` is an unknown value. - fn resolve_kind(&self) -> Option { + pub fn resolve_kind(&self) -> Option { match self.kind { x if x == SpecialRecordKind::Logout as u8 => Some(SpecialRecordKind::Logout), diff --git a/beacon_chain/utils/ssz_helpers/src/ssz_beacon_block.rs b/beacon_chain/utils/ssz_helpers/src/ssz_beacon_block.rs index 3066f5679..d466d3abc 100644 --- a/beacon_chain/utils/ssz_helpers/src/ssz_beacon_block.rs +++ b/beacon_chain/utils/ssz_helpers/src/ssz_beacon_block.rs @@ -127,6 +127,7 @@ impl<'a> SszBeaconBlock<'a> { } pub fn len(&self) -> usize { self.ssz.len() } + pub fn is_empty(&self) -> bool { self.ssz.is_empty() } /// Return the canonical hash for this block. pub fn block_hash(&self) -> Vec {