mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-15 09:48:20 +00:00
Clarify import sequence of child FULL
This commit is contained in:
@@ -17,7 +17,7 @@ use std::{
|
||||
};
|
||||
use types::{
|
||||
AttestationShufflingId, ChainSpec, Checkpoint, Epoch, EthSpec, ExecutionBlockHash, Hash256,
|
||||
Slot,
|
||||
SignedExecutionPayloadBid, Slot,
|
||||
};
|
||||
|
||||
pub const DEFAULT_PRUNE_THRESHOLD: usize = 256;
|
||||
@@ -292,6 +292,19 @@ 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.
|
||||
|
||||
Reference in New Issue
Block a user