mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Fix lots of typos.
This commit is contained in:
@@ -247,7 +247,7 @@ pub enum IndexedAttestationInvalid {
|
||||
MaxIndicesExceed(u64, usize),
|
||||
/// The validator indices were not in increasing order.
|
||||
///
|
||||
/// The error occured between the given `index` and `index + 1`
|
||||
/// The error occurred between the given `index` and `index + 1`
|
||||
BadValidatorIndicesOrdering(usize),
|
||||
/// The validator index is unknown. One cannot slash one who does not exist.
|
||||
UnknownValidator(u64),
|
||||
@@ -413,7 +413,7 @@ pub enum TransferInvalid {
|
||||
/// The `transfer.from` validator has been activated and is not withdrawable.
|
||||
///
|
||||
/// (from_validator)
|
||||
FromValidatorIneligableForTransfer(u64),
|
||||
FromValidatorIneligibleForTransfer(u64),
|
||||
/// The validators withdrawal credentials do not match `transfer.pubkey`.
|
||||
///
|
||||
/// (state_credentials, transfer_pubkey_credentials)
|
||||
|
||||
@@ -114,7 +114,7 @@ fn verify_transfer_parametric<T: EthSpec>(
|
||||
|| sender_validator.activation_eligibility_epoch == spec.far_future_epoch
|
||||
|| sender_validator.is_withdrawable_at(epoch)
|
||||
|| total_amount + spec.max_effective_balance <= sender_balance,
|
||||
Invalid::FromValidatorIneligableForTransfer(transfer.sender)
|
||||
Invalid::FromValidatorIneligibleForTransfer(transfer.sender)
|
||||
);
|
||||
|
||||
// Ensure the withdrawal credentials generated from the sender's pubkey match those stored in
|
||||
|
||||
@@ -47,7 +47,7 @@ pub fn per_epoch_processing<T: EthSpec>(
|
||||
// Crosslinks.
|
||||
let winning_root_for_shards = process_crosslinks(state, spec)?;
|
||||
|
||||
// Rewards and Penalities.
|
||||
// Rewards and Penalties.
|
||||
process_rewards_and_penalties(
|
||||
state,
|
||||
&mut validator_statuses,
|
||||
|
||||
@@ -12,7 +12,7 @@ pub fn process_slashings<T: EthSpec>(
|
||||
|
||||
let total_at_start = state.get_slashed_balance(current_epoch + 1)?;
|
||||
let total_at_end = state.get_slashed_balance(current_epoch)?;
|
||||
let total_penalities = total_at_end - total_at_start;
|
||||
let total_penalties = total_at_end - total_at_start;
|
||||
|
||||
for (index, validator) in state.validator_registry.iter().enumerate() {
|
||||
let should_penalize = current_epoch.as_usize() + T::LatestSlashedExitLength::to_usize() / 2
|
||||
@@ -22,7 +22,7 @@ pub fn process_slashings<T: EthSpec>(
|
||||
let effective_balance = state.get_effective_balance(index, spec)?;
|
||||
|
||||
let penalty = std::cmp::max(
|
||||
effective_balance * std::cmp::min(total_penalities * 3, current_total_balance)
|
||||
effective_balance * std::cmp::min(total_penalties * 3, current_total_balance)
|
||||
/ current_total_balance,
|
||||
effective_balance / spec.min_slashing_penalty_quotient,
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@ use super::Error;
|
||||
use itertools::{Either, Itertools};
|
||||
use types::*;
|
||||
|
||||
/// Peforms a validator registry update, if required.
|
||||
/// Performs a validator registry update, if required.
|
||||
///
|
||||
/// Spec v0.6.3
|
||||
pub fn process_registry_updates<T: EthSpec>(
|
||||
|
||||
@@ -150,7 +150,7 @@ pub struct TotalBalances {
|
||||
/// some `BeaconState`.
|
||||
#[derive(Clone)]
|
||||
pub struct ValidatorStatuses {
|
||||
/// Information about each individual validator from the state's validator registy.
|
||||
/// Information about each individual validator from the state's validator registry.
|
||||
pub statuses: Vec<ValidatorStatus>,
|
||||
/// Summed balances for various sets of validators.
|
||||
pub total_balances: TotalBalances,
|
||||
|
||||
Reference in New Issue
Block a user