Fix minor PR comments
This commit is contained in:
parent
e410e89898
commit
b7e43b56f9
@ -536,7 +536,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
/// If valid, the attestation is added to `self.op_pool` and `self.fork_choice`.
|
/// If valid, the attestation is added to `self.op_pool` and `self.fork_choice`.
|
||||||
///
|
///
|
||||||
/// Returns an `Ok(AttestationProcessingOutcome)` if the chain was able to make a determination
|
/// Returns an `Ok(AttestationProcessingOutcome)` if the chain was able to make a determination
|
||||||
/// about the `attestation` (wether it was invalid or not). Returns an `Err` if the was an
|
/// about the `attestation` (whether it was invalid or not). Returns an `Err` if there was an
|
||||||
/// error during this process and no determination was able to be made.
|
/// error during this process and no determination was able to be made.
|
||||||
///
|
///
|
||||||
/// ## Notes
|
/// ## Notes
|
||||||
@ -620,7 +620,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
outcome
|
outcome
|
||||||
} else {
|
} else {
|
||||||
// Use the `data.beacon_block_root` to load the state from the latest non-skipped
|
// Use the `data.beacon_block_root` to load the state from the latest non-skipped
|
||||||
// slot preceding the attestations creation.
|
// slot preceding the attestation's creation.
|
||||||
//
|
//
|
||||||
// This state is guaranteed to be in the same chain as the attestation, but it's
|
// This state is guaranteed to be in the same chain as the attestation, but it's
|
||||||
// not guaranteed to be from the same slot or epoch as the attestation.
|
// not guaranteed to be from the same slot or epoch as the attestation.
|
||||||
@ -703,7 +703,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
/// The given `state` must fulfil one of the following conditions:
|
/// The given `state` must fulfil one of the following conditions:
|
||||||
///
|
///
|
||||||
/// - `state` corresponds to the `block.state_root` identified by
|
/// - `state` corresponds to the `block.state_root` identified by
|
||||||
/// `attestation.data.beacon_block_root`. (Viz., `attestation` was created using `state`.
|
/// `attestation.data.beacon_block_root`. (Viz., `attestation` was created using `state`).
|
||||||
/// - `state.slot` is in the same epoch as `data.target.epoch` and
|
/// - `state.slot` is in the same epoch as `data.target.epoch` and
|
||||||
/// `attestation.data.beacon_block_root` is in the history of `state`.
|
/// `attestation.data.beacon_block_root` is in the history of `state`.
|
||||||
///
|
///
|
||||||
|
@ -777,11 +777,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_ref(&self, i: usize) -> Option<&T> {
|
pub fn get_ref(&self, i: usize) -> Option<&T> {
|
||||||
if i < self.0.len() {
|
self.0.get(i)
|
||||||
Some(&self.0[i])
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn insert(&mut self, i: usize, element: T) {
|
pub fn insert(&mut self, i: usize, element: T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user