Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pschork committed Jul 25, 2024
1 parent 41cdbfd commit b6deafb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
23 changes: 0 additions & 23 deletions disperser/batcher/batchstore/minibatch_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion disperser/batcher/minibatch_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b6deafb

Please sign in to comment.