Fix clippy lints
This commit is contained in:
parent
28ffb037cc
commit
b2495cbcff
@ -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,
|
||||
|
@ -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<SpecialRecordKind> {
|
||||
pub fn resolve_kind(&self) -> Option<SpecialRecordKind> {
|
||||
match self.kind {
|
||||
x if x == SpecialRecordKind::Logout as u8
|
||||
=> Some(SpecialRecordKind::Logout),
|
||||
|
@ -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<u8> {
|
||||
|
Loading…
Reference in New Issue
Block a user