From 89802fe410f59e35cefc2422b17f8de391fcaf6a Mon Sep 17 00:00:00 2001 From: pengzhen Date: Mon, 8 Apr 2024 13:20:07 +0800 Subject: [PATCH] fix: FixedLength method err --- eth2/beacon/capella/lightclient.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/eth2/beacon/capella/lightclient.go b/eth2/beacon/capella/lightclient.go index deb41d7..7f75f70 100644 --- a/eth2/beacon/capella/lightclient.go +++ b/eth2/beacon/capella/lightclient.go @@ -88,7 +88,7 @@ func NewLightClientBootstrapType(spec *common.Spec) *view.ContainerTypeDef { } func (lcb *LightClientBootstrap) FixedLength(spec *common.Spec) uint64 { - return codec.ContainerLength(&lcb.Header, spec.Wrap(&lcb.CurrentSyncCommittee), &lcb.CurrentSyncCommitteeBranch) + return 0 } func (lcb *LightClientBootstrap) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error { @@ -175,15 +175,7 @@ func (lcu *LightClientUpdate) ByteLength(spec *common.Spec) uint64 { } func (lcu *LightClientUpdate) FixedLength(spec *common.Spec) uint64 { - return codec.ContainerLength( - &lcu.AttestedHeader, - spec.Wrap(&lcu.NextSyncCommittee), - &lcu.NextSyncCommitteeBranch, - &lcu.FinalizedHeader, - &lcu.FinalityBranch, - spec.Wrap(&lcu.SyncAggregate), - &lcu.SignatureSlot, - ) + return 0 } func (lcu *LightClientUpdate) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root { @@ -217,7 +209,7 @@ func LightClientFinalityUpdateType(spec *common.Spec) *view.ContainerTypeDef { } func (lcfu *LightClientFinalityUpdate) FixedLength(spec *common.Spec) uint64 { - return codec.ContainerLength(&lcfu.AttestedHeader, &lcfu.FinalizedHeader, &lcfu.FinalityBranch, spec.Wrap(&lcfu.SyncAggregate), &lcfu.SignatureSlot) + return 0 } func (lcfu *LightClientFinalityUpdate) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error { @@ -259,7 +251,7 @@ func LightClientOptimisticUpdateType(spec *common.Spec) *view.ContainerTypeDef { } func (lcou *LightClientOptimisticUpdate) FixedLength(spec *common.Spec) uint64 { - return codec.ContainerLength(&lcou.AttestedHeader, spec.Wrap(&lcou.SyncAggregate), &lcou.SignatureSlot) + return 0 } func (lcou *LightClientOptimisticUpdate) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error {