mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-11 12:09:57 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -4,10 +4,12 @@ use crate::{
|
||||
VerifyBlockRoot,
|
||||
};
|
||||
use std::marker::PhantomData;
|
||||
use types::{BeaconState, ChainSpec, EthSpec, Hash256, SignedBeaconBlock, Slot};
|
||||
use types::{BeaconState, BlindedPayload, ChainSpec, EthSpec, Hash256, SignedBeaconBlock, Slot};
|
||||
|
||||
type PreBlockHook<'a, E, Error> =
|
||||
Box<dyn FnMut(&mut BeaconState<E>, &SignedBeaconBlock<E>) -> Result<(), Error> + 'a>;
|
||||
type PreBlockHook<'a, E, Error> = Box<
|
||||
dyn FnMut(&mut BeaconState<E>, &SignedBeaconBlock<E, BlindedPayload<E>>) -> Result<(), Error>
|
||||
+ 'a,
|
||||
>;
|
||||
type PostBlockHook<'a, E, Error> = PreBlockHook<'a, E, Error>;
|
||||
type PreSlotHook<'a, E, Error> = Box<dyn FnMut(&mut BeaconState<E>) -> Result<(), Error> + 'a>;
|
||||
type PostSlotHook<'a, E, Error> = Box<
|
||||
@@ -155,7 +157,7 @@ where
|
||||
fn get_state_root(
|
||||
&mut self,
|
||||
slot: Slot,
|
||||
blocks: &[SignedBeaconBlock<E>],
|
||||
blocks: &[SignedBeaconBlock<E, BlindedPayload<E>>],
|
||||
i: usize,
|
||||
) -> Result<Option<Hash256>, Error> {
|
||||
// If a state root iterator is configured, use it to find the root.
|
||||
@@ -189,7 +191,7 @@ where
|
||||
/// after the blocks have been applied.
|
||||
pub fn apply_blocks(
|
||||
mut self,
|
||||
blocks: Vec<SignedBeaconBlock<E>>,
|
||||
blocks: Vec<SignedBeaconBlock<E, BlindedPayload<E>>>,
|
||||
target_slot: Option<Slot>,
|
||||
) -> Result<Self, Error> {
|
||||
for (i, block) in blocks.iter().enumerate() {
|
||||
|
||||
Reference in New Issue
Block a user