mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Merge branch 'gloas-containers' into gloas_envelope_processing_merge_containers
This commit is contained in:
@@ -689,7 +689,9 @@ pub fn get_expected_withdrawals<E: EthSpec>(
|
||||
}
|
||||
|
||||
Ok((
|
||||
withdrawals.into(),
|
||||
withdrawals
|
||||
.try_into()
|
||||
.map_err(BlockProcessingError::SszTypesError)?,
|
||||
processed_builder_withdrawals_count,
|
||||
processed_partial_withdrawals_count,
|
||||
))
|
||||
|
||||
@@ -213,7 +213,7 @@ async fn valid_4_deposits() {
|
||||
let mut state = harness.get_current_state();
|
||||
|
||||
let (deposits, state) = harness.make_deposits(&mut state, 4, None, None);
|
||||
let deposits = VariableList::from(deposits);
|
||||
let deposits = VariableList::try_from(deposits).unwrap();
|
||||
|
||||
let mut head_block = harness
|
||||
.chain
|
||||
@@ -237,7 +237,7 @@ async fn invalid_deposit_deposit_count_too_big() {
|
||||
let mut state = harness.get_current_state();
|
||||
|
||||
let (deposits, state) = harness.make_deposits(&mut state, 1, None, None);
|
||||
let deposits = VariableList::from(deposits);
|
||||
let deposits = VariableList::try_from(deposits).unwrap();
|
||||
|
||||
let mut head_block = harness
|
||||
.chain
|
||||
@@ -269,7 +269,7 @@ async fn invalid_deposit_count_too_small() {
|
||||
let mut state = harness.get_current_state();
|
||||
|
||||
let (deposits, state) = harness.make_deposits(&mut state, 1, None, None);
|
||||
let deposits = VariableList::from(deposits);
|
||||
let deposits = VariableList::try_from(deposits).unwrap();
|
||||
|
||||
let mut head_block = harness
|
||||
.chain
|
||||
@@ -301,7 +301,7 @@ async fn invalid_deposit_bad_merkle_proof() {
|
||||
let mut state = harness.get_current_state();
|
||||
|
||||
let (deposits, state) = harness.make_deposits(&mut state, 1, None, None);
|
||||
let deposits = VariableList::from(deposits);
|
||||
let deposits = VariableList::try_from(deposits).unwrap();
|
||||
|
||||
let mut head_block = harness
|
||||
.chain
|
||||
@@ -336,7 +336,7 @@ async fn invalid_deposit_wrong_sig() {
|
||||
|
||||
let (deposits, state) =
|
||||
harness.make_deposits(&mut state, 1, None, Some(SignatureBytes::empty()));
|
||||
let deposits = VariableList::from(deposits);
|
||||
let deposits = VariableList::try_from(deposits).unwrap();
|
||||
|
||||
let mut head_block = harness
|
||||
.chain
|
||||
@@ -360,7 +360,7 @@ async fn invalid_deposit_invalid_pub_key() {
|
||||
|
||||
let (deposits, state) =
|
||||
harness.make_deposits(&mut state, 1, Some(PublicKeyBytes::empty()), None);
|
||||
let deposits = VariableList::from(deposits);
|
||||
let deposits = VariableList::try_from(deposits).unwrap();
|
||||
|
||||
let mut head_block = harness
|
||||
.chain
|
||||
@@ -753,10 +753,12 @@ async fn invalid_attester_slashing_1_invalid() {
|
||||
let mut attester_slashing = harness.make_attester_slashing(vec![1, 2]);
|
||||
match &mut attester_slashing {
|
||||
AttesterSlashing::Base(attester_slashing) => {
|
||||
attester_slashing.attestation_1.attesting_indices = VariableList::from(vec![2, 1]);
|
||||
attester_slashing.attestation_1.attesting_indices =
|
||||
VariableList::try_from(vec![2, 1]).unwrap();
|
||||
}
|
||||
AttesterSlashing::Electra(attester_slashing) => {
|
||||
attester_slashing.attestation_1.attesting_indices = VariableList::from(vec![2, 1]);
|
||||
attester_slashing.attestation_1.attesting_indices =
|
||||
VariableList::try_from(vec![2, 1]).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -791,10 +793,12 @@ async fn invalid_attester_slashing_2_invalid() {
|
||||
let mut attester_slashing = harness.make_attester_slashing(vec![1, 2]);
|
||||
match &mut attester_slashing {
|
||||
AttesterSlashing::Base(attester_slashing) => {
|
||||
attester_slashing.attestation_2.attesting_indices = VariableList::from(vec![2, 1]);
|
||||
attester_slashing.attestation_2.attesting_indices =
|
||||
VariableList::try_from(vec![2, 1]).unwrap();
|
||||
}
|
||||
AttesterSlashing::Electra(attester_slashing) => {
|
||||
attester_slashing.attestation_2.attesting_indices = VariableList::from(vec![2, 1]);
|
||||
attester_slashing.attestation_2.attesting_indices =
|
||||
VariableList::try_from(vec![2, 1]).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use crate::per_block_processing::{
|
||||
verify_proposer_slashing,
|
||||
};
|
||||
use arbitrary::Arbitrary;
|
||||
use derivative::Derivative;
|
||||
use educe::Educe;
|
||||
use smallvec::{SmallVec, smallvec};
|
||||
use ssz::{Decode, Encode};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
@@ -39,11 +39,11 @@ pub trait TransformPersist {
|
||||
///
|
||||
/// The inner `op` field is private, meaning instances of this type can only be constructed
|
||||
/// by calling `validate`.
|
||||
#[derive(Derivative, Debug, Clone, Arbitrary)]
|
||||
#[derivative(
|
||||
#[derive(Educe, Debug, Clone, Arbitrary)]
|
||||
#[educe(
|
||||
PartialEq,
|
||||
Eq,
|
||||
Hash(bound = "T: TransformPersist + std::hash::Hash, E: EthSpec")
|
||||
Hash(bound(T: TransformPersist + std::hash::Hash, E: EthSpec))
|
||||
)]
|
||||
#[arbitrary(bound = "T: TransformPersist + Arbitrary<'arbitrary>, E: EthSpec")]
|
||||
pub struct SigVerifiedOp<T: TransformPersist, E: EthSpec> {
|
||||
|
||||
Reference in New Issue
Block a user