mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 13:28:33 +00:00
Fix failing attestation tests and misc electra attestation cleanup (#5810)
* - get attestation related beacon chain tests to pass - observed attestations are now keyed off of data + committee index - rename op pool attestationref to compactattestationref - remove unwraps in agg pool and use options instead - cherry pick some changes from ef-tests-electra * cargo fmt * fix failing test * Revert dockerfile changes * make committee_index return option * function args shouldnt be a ref to attestation ref * fmt * fix dup imports --------- Co-authored-by: realbigsean <seananderson33@GMAIL.com>
This commit is contained in:
@@ -261,9 +261,9 @@ impl<E: EthSpec> AggregateMap for AggregatedAttestationMap<E> {
|
||||
};
|
||||
|
||||
let attestation_key = AttestationKey::from_attestation_ref(a)?;
|
||||
let attestation_data_root = attestation_key.tree_hash_root();
|
||||
let attestation_key_root = attestation_key.tree_hash_root();
|
||||
|
||||
if let Some(existing_attestation) = self.map.get_mut(&attestation_data_root) {
|
||||
if let Some(existing_attestation) = self.map.get_mut(&attestation_key_root) {
|
||||
if existing_attestation
|
||||
.get_aggregation_bit(aggregation_bit)
|
||||
.map_err(|_| Error::InconsistentBitfieldLengths)?
|
||||
@@ -285,7 +285,7 @@ impl<E: EthSpec> AggregateMap for AggregatedAttestationMap<E> {
|
||||
}
|
||||
|
||||
self.map
|
||||
.insert(attestation_data_root, a.clone_as_attestation());
|
||||
.insert(attestation_key_root, a.clone_as_attestation());
|
||||
Ok(InsertOutcome::NewItemInserted {
|
||||
committee_index: aggregation_bit,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user