Skip to content

Commit ccb519b

Browse files
committed
Moar Progress
1 parent f3b7983 commit ccb519b

File tree

9 files changed

+200
-260
lines changed

9 files changed

+200
-260
lines changed

beacon_node/beacon_chain/src/beacon_chain.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,23 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
11351135
}
11361136
}
11371137

1138+
/// Returns the full block at the given root, if it's available in the database.
1139+
///
1140+
/// Should always return a full block for pre-merge and post-gloas blocks.
1141+
/// An
1142+
pub fn get_full_block(
1143+
&self,
1144+
block_root: &Hash256,
1145+
) -> Result<Option<SignedBeaconBlock<T::EthSpec>>, Error> {
1146+
match self.store.try_get_full_block(block_root)? {
1147+
Some(DatabaseBlock::Full(block)) => Ok(Some(block)),
1148+
Some(DatabaseBlock::Blinded(_)) => {
1149+
Err(Error::ExecutionPayloadMissingFromDatabase(*block_root))
1150+
}
1151+
None => Ok(None),
1152+
}
1153+
}
1154+
11381155
/// Returns the block at the given root, if any.
11391156
///
11401157
/// ## Errors

beacon_node/beacon_chain/src/block_verification.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,8 @@ pub struct SignatureVerifiedBlock<T: BeaconChainTypes> {
708708
}
709709

710710
/// Used to await the result of executing payload with an EE.
711-
type PayloadVerificationHandle = JoinHandle<Option<Result<PayloadVerificationOutcome, BlockError>>>;
711+
pub type PayloadVerificationHandle =
712+
JoinHandle<Option<Result<PayloadVerificationOutcome, BlockError>>>;
712713

713714
/// A wrapper around a `SignedBeaconBlock` that indicates that this block is fully verified and
714715
/// ready to import into the `BeaconChain`. The validation includes:

0 commit comments

Comments
 (0)