Clarify import sequence of child FULL

This commit is contained in:
dapplion
2026-06-01 07:14:30 +02:00
parent a70a120d55
commit efa02ede46
7 changed files with 89 additions and 84 deletions

View File

@@ -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.