From b6deafb4c3142476dc6430a8c596c66cb9411a69 Mon Sep 17 00:00:00 2001 From: Patrick Schork <354473+pschork@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:27:26 -0700 Subject: [PATCH] Lint --- .../batcher/batchstore/minibatch_store.go | 23 ------------------- disperser/batcher/minibatch_store.go | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/disperser/batcher/batchstore/minibatch_store.go b/disperser/batcher/batchstore/minibatch_store.go index cf69c7b24d..5fe1bf3c79 100644 --- a/disperser/batcher/batchstore/minibatch_store.go +++ b/disperser/batcher/batchstore/minibatch_store.go @@ -110,7 +110,6 @@ func MarshalBatchRecord(batch *batcher.BatchRecord) (map[string]types.AttributeV return nil, err } fields["BatchID"] = &types.AttributeValueMemberS{Value: batch.ID.String()} - fields["BatchStatus"] = &types.AttributeValueMemberN{Value: strconv.Itoa(int(batch.Status))} fields["SK"] = &types.AttributeValueMemberS{Value: batchSKPrefix + batch.ID.String()} fields["CreatedAt"] = &types.AttributeValueMemberN{Value: fmt.Sprintf("%d", batch.CreatedAt.UTC().Unix())} return fields, nil @@ -170,22 +169,6 @@ func UnmarshalBatchID(item commondynamodb.Item) (*uuid.UUID, error) { return &batchID, nil } -func UnmarshalBatchStatus(item commondynamodb.Item) (*batcher.BatchStatus, error) { - type BatchStatus struct { - BatchStatus uint - } - - batch := BatchStatus{} - err := attributevalue.UnmarshalMap(item, &batch) - if err != nil { - return nil, err - } - - status := batcher.BatchStatus(batch.BatchStatus) - - return &status, nil -} - func UnmarshalOperatorID(item commondynamodb.Item) (*core.OperatorID, error) { type OperatorID struct { OperatorID string @@ -218,12 +201,6 @@ func UnmarshalBatchRecord(item commondynamodb.Item) (*batcher.BatchRecord, error } batch.ID = *batchID - batchStatus, err := UnmarshalBatchStatus(item) - if err != nil { - return nil, err - } - batch.Status = *batchStatus - batch.CreatedAt = batch.CreatedAt.UTC() return &batch, nil } diff --git a/disperser/batcher/minibatch_store.go b/disperser/batcher/minibatch_store.go index 953a574eb0..5f27c004a2 100644 --- a/disperser/batcher/minibatch_store.go +++ b/disperser/batcher/minibatch_store.go @@ -33,7 +33,7 @@ type BatchRecord struct { ID uuid.UUID `dynamodbav:"-"` CreatedAt time.Time ReferenceBlockNumber uint - Status BatchStatus `dynamodbav:"-"` + Status BatchStatus `dynamodbav:"BatchStatus"` HeaderHash [32]byte AggregatePubKey *core.G2Point AggregateSignature *core.Signature