Pass failed gossip blocks to the slasher (#2047)

## Issue Addressed

Closes #2042

## Proposed Changes

Pass blocks that fail gossip verification to the slasher. Blocks that are successfully verified are not passed immediately, but will be passed as part of full block verification.
This commit is contained in:
Michael Sproul
2020-12-04 05:03:30 +00:00
parent 7933596c89
commit c1ec386d18
4 changed files with 80 additions and 27 deletions

View File

@@ -235,7 +235,7 @@ pub struct BeaconChain<T: BeaconChainTypes> {
/// Arbitrary bytes included in the blocks.
pub(crate) graffiti: Graffiti,
/// Optional slasher.
pub(crate) slasher: Option<Arc<Slasher<T::EthSpec>>>,
pub slasher: Option<Arc<Slasher<T::EthSpec>>>,
}
type BeaconBlockAndState<T> = (BeaconBlock<T>, BeaconState<T>);