mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
Simplify diff strat and expand tests (they mostly pass!)
This commit is contained in:
@@ -320,7 +320,7 @@ where
|
||||
.block_hash;
|
||||
|
||||
// Similar to `is_parent_block_full`, but reading the block hash from the
|
||||
// not-yet-applied `block`. The 0x0 case covers genesis (no block replay reqd).
|
||||
// not-yet-applied `block`. The slot 0 case covers genesis (no block replay reqd).
|
||||
if self.state.slot() != 0 && block.is_parent_block_full(latest_bid_block_hash) {
|
||||
let envelope = next_envelope_at_slot(self.state.slot())?;
|
||||
// State root for the next slot processing is now the envelope's state root.
|
||||
|
||||
@@ -1284,25 +1284,6 @@ impl<E: EthSpec> BeaconState<E> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Determine the payload status of this state with all skipped slots considered pending.
|
||||
///
|
||||
/// Prior to Gloas this is always `Pending`.
|
||||
///
|
||||
/// Post-Gloas, the definition of the `StatePayloadStatus` is:
|
||||
///
|
||||
/// - `Full` if this state is the IMMEDIATE result of envelope processing (no skipped slots)
|
||||
/// - `Pending` if this state is the result of block processing, or slot processing (skipped
|
||||
/// slot).
|
||||
pub fn payload_status_with_skipped_pending(&self) -> StatePayloadStatus {
|
||||
if !self.fork_name_unchecked().gloas_enabled() {
|
||||
StatePayloadStatus::Pending
|
||||
} else if self.is_parent_block_full() && self.latest_block_header().slot == self.slot() {
|
||||
StatePayloadStatus::Full
|
||||
} else {
|
||||
StatePayloadStatus::Pending
|
||||
}
|
||||
}
|
||||
|
||||
/// Return `true` if the validator who produced `slot_signature` is eligible to aggregate.
|
||||
///
|
||||
/// Spec v0.12.1
|
||||
|
||||
Reference in New Issue
Block a user