mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 22:49:34 +00:00
Clean up
This commit is contained in:
@@ -17,7 +17,7 @@ use std::{
|
||||
};
|
||||
use types::{
|
||||
AttestationShufflingId, ChainSpec, Checkpoint, Epoch, EthSpec, ExecutionBlockHash, Hash256,
|
||||
SignedExecutionPayloadBid, Slot,
|
||||
Slot,
|
||||
};
|
||||
|
||||
pub const DEFAULT_PRUNE_THRESHOLD: usize = 256;
|
||||
@@ -292,19 +292,6 @@ impl Block {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_child_full<E: EthSpec>(&self, child_bid: &SignedExecutionPayloadBid<E>) -> bool {
|
||||
if let Some(execution_payload_block_hash) = self.execution_payload_block_hash {
|
||||
execution_payload_block_hash == child_bid.message.parent_block_hash
|
||||
} else if let Some(execution_block_hash) = self.execution_status.block_hash() {
|
||||
// Parent is before Gloas, and child is gloas
|
||||
execution_block_hash == child_bid.message.parent_block_hash
|
||||
} else {
|
||||
// TODO(gloas): What to return here? The child is Gloas but parent doesn't have an
|
||||
// execution hash
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A Vec-wrapper which will grow to match any request.
|
||||
|
||||
@@ -361,14 +361,6 @@ impl<E: EthSpec, Payload: AbstractExecPayload<E>> SignedBeaconBlock<E, Payload>
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
pub fn parent_block_hash(&self) -> Option<ExecutionBlockHash> {
|
||||
self.message()
|
||||
.body()
|
||||
.signed_execution_payload_bid()
|
||||
.ok()
|
||||
.map(|bid| bid.message.parent_block_hash)
|
||||
}
|
||||
|
||||
/// Used for displaying commitments in logs.
|
||||
pub fn commitments_formatted(&self) -> String {
|
||||
let Ok(commitments) = self.message().body().blob_kzg_commitments() else {
|
||||
|
||||
Reference in New Issue
Block a user