mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
fix blob validation for empty blobs when using
This commit is contained in:
@@ -42,6 +42,7 @@ pub enum Error {
|
||||
// Boxed to avoid an infinite-size recursion issue.
|
||||
BeaconChain(Box<BeaconChainError>),
|
||||
MissingBeaconState(Hash256),
|
||||
MissingBlobs,
|
||||
FailedToTransitionState(StateAdvanceError),
|
||||
CannotAttestToFutureState {
|
||||
state_slot: Slot,
|
||||
|
||||
@@ -2935,7 +2935,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
// If the write fails, revert fork choice to the version from disk, else we can
|
||||
// end up with blocks in fork choice that are missing from disk.
|
||||
// See https://github.com/sigp/lighthouse/issues/2028
|
||||
let (signed_block, blobs) = signed_block.deconstruct();
|
||||
let (signed_block, blobs) = signed_block.deconstruct(Some(block_root));
|
||||
let block = signed_block.message();
|
||||
let mut ops: Vec<_> = confirmed_state_roots
|
||||
.into_iter()
|
||||
|
||||
@@ -69,7 +69,7 @@ impl<E: EthSpec> EarlyAttesterCache<E> {
|
||||
},
|
||||
};
|
||||
|
||||
let (block, blobs) = block.deconstruct();
|
||||
let (block, blobs) = block.deconstruct(Some(beacon_block_root));
|
||||
let item = CacheItem {
|
||||
epoch,
|
||||
committee_lengths,
|
||||
@@ -77,7 +77,7 @@ impl<E: EthSpec> EarlyAttesterCache<E> {
|
||||
source,
|
||||
target,
|
||||
block,
|
||||
blobs: blobs?,
|
||||
blobs: blobs.map_err(|_|Error::MissingBlobs)?,
|
||||
proto_block,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user