mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Add post attestation v2 endpoint logic to attestation service
This commit is contained in:
@@ -457,8 +457,11 @@ impl<T: SlotClock + 'static, E: EthSpec> AttestationService<T, E> {
|
||||
&[validator_metrics::ATTESTATIONS_HTTP_POST],
|
||||
);
|
||||
if fork_name.electra_enabled() {
|
||||
let single_attestations = attestations.iter().zip(validator_indices).filter_map(|(a, i)| {
|
||||
a.to_single_attestation_with_attester_index(*i as usize).ok()
|
||||
}).collect::<Vec<_>>();
|
||||
beacon_node
|
||||
.post_beacon_pool_attestations_v2(attestations, fork_name)
|
||||
.post_beacon_pool_attestations_v2::<E>(&single_attestations, fork_name)
|
||||
.await
|
||||
} else {
|
||||
beacon_node
|
||||
|
||||
Reference in New Issue
Block a user