mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-01 03:33:47 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -942,6 +942,11 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
|
||||
return Err(BlockError::ProposalSignatureInvalid);
|
||||
}
|
||||
|
||||
chain
|
||||
.observed_slashable
|
||||
.write()
|
||||
.observe_slashable(block.slot(), block.message().proposer_index(), block_root)
|
||||
.map_err(|e| BlockError::BeaconChainError(e.into()))?;
|
||||
// Now the signature is valid, store the proposal so we don't accept another from this
|
||||
// validator and slot.
|
||||
//
|
||||
@@ -1239,6 +1244,12 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
|
||||
chain: &Arc<BeaconChain<T>>,
|
||||
notify_execution_layer: NotifyExecutionLayer,
|
||||
) -> Result<Self, BlockError<T::EthSpec>> {
|
||||
chain
|
||||
.observed_slashable
|
||||
.write()
|
||||
.observe_slashable(block.slot(), block.message().proposer_index(), block_root)
|
||||
.map_err(|e| BlockError::BeaconChainError(e.into()))?;
|
||||
|
||||
chain
|
||||
.observed_block_producers
|
||||
.write()
|
||||
@@ -2026,7 +2037,7 @@ fn get_signature_verifier<'a, T: BeaconChainTypes>(
|
||||
/// Verify that `header` was signed with a valid signature from its proposer.
|
||||
///
|
||||
/// Return `Ok(())` if the signature is valid, and an `Err` otherwise.
|
||||
fn verify_header_signature<T: BeaconChainTypes, Err: BlockBlobError>(
|
||||
pub fn verify_header_signature<T: BeaconChainTypes, Err: BlockBlobError>(
|
||||
chain: &BeaconChain<T>,
|
||||
header: &SignedBeaconBlockHeader,
|
||||
) -> Result<(), Err> {
|
||||
|
||||
Reference in New Issue
Block a user