Skip to content

Commit

Permalink
fix: memstore returns data_length in number of symbols instead of byt…
Browse files Browse the repository at this point in the history
…es (#223)

* make memstore return data_lenght in number of symbols

* fix lint

* lint
  • Loading branch information
bxue-l2 authored Jan 3, 2025
1 parent 7dd3faa commit b8a625f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store/generated_key/memstore/memstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

const (
DefaultPruneInterval = 500 * time.Millisecond
BytesPerFieldElement = 32
)

type Config struct {
Expand Down Expand Up @@ -168,7 +169,7 @@ func (e *MemStore) Put(_ context.Context, value []byte) ([]byte, error) {
X: commitment.X.Marshal(),
Y: commitment.Y.Marshal(),
},
DataLength: uint32(len(encodedVal)), // #nosec G115
DataLength: uint32((len(encodedVal) + BytesPerFieldElement - 1) / BytesPerFieldElement), // #nosec G115
BlobQuorumParams: []*disperser.BlobQuorumParam{
{
QuorumNumber: 1,
Expand Down

0 comments on commit b8a625f

Please sign in to comment.