mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
create unified slashing cache (#5033)
* create unified slashing cache * add observed slashable file * fix broadcast validation tests * revert block seen cache changes * clean up slashable cache test * check header signatures for RPC blobs * don't throw error on RPC signature invalie
This commit is contained in:
@@ -155,13 +155,12 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
|
||||
// Checks if a block from this proposer is already known.
|
||||
let block_equivocates = || {
|
||||
match self
|
||||
.chain
|
||||
.observed_block_producers
|
||||
.read()
|
||||
.proposer_has_been_observed(block.message(), block.canonical_root())
|
||||
{
|
||||
Ok(seen_status) => seen_status.is_slashable(),
|
||||
match self.chain.observed_slashable.read().is_slashable(
|
||||
block.slot(),
|
||||
block.message().proposer_index(),
|
||||
block.canonical_root(),
|
||||
) {
|
||||
Ok(is_slashable) => is_slashable,
|
||||
//Both of these blocks will be rejected, so reject them now rather
|
||||
// than re-queuing them.
|
||||
Err(ObserveError::FinalizedBlock { .. })
|
||||
|
||||
Reference in New Issue
Block a user