Skip to content

Commit 4501e08

Browse files
committed
fix: select correct gossip type when publishing single attestation (#7256)
* fix: select correct gossip type when publishing single attestation * Add SingleAttestation as alias to phase0 ssz types
1 parent 1a74884 commit 4501e08

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/beacon-node/src/network/gossip/topic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function getGossipSSZType(topic: GossipTopic) {
8989
case GossipType.beacon_aggregate_and_proof:
9090
return sszTypesFor(topic.fork).SignedAggregateAndProof;
9191
case GossipType.beacon_attestation:
92-
return sszTypesFor(topic.fork).Attestation;
92+
return sszTypesFor(topic.fork).SingleAttestation;
9393
case GossipType.proposer_slashing:
9494
return ssz.phase0.ProposerSlashing;
9595
case GossipType.attester_slashing:

packages/types/src/phase0/sszTypes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ export const Attestation = new ContainerType(
316316
{typeName: "Attestation", jsonCase: "eth2"}
317317
);
318318

319+
export const SingleAttestation = Attestation;
320+
319321
export const AttesterSlashing = new ContainerType(
320322
{
321323
// In state transition, AttesterSlashing attestations are only partially validated. Their slot and epoch could

0 commit comments

Comments
 (0)