Skip to content

Commit

Permalink
feat: mem store - handle random read err
Browse files Browse the repository at this point in the history
  • Loading branch information
ethenotethan committed May 23, 2024
1 parent c484dd5 commit 568bfc0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion store/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ func (e *MemStore) Put(ctx context.Context, value []byte) ([]byte, error) {
// add some entropy to commit to emulate randomness seen in EigenDA
// when generating operator BLS signature certificates
entropy := make([]byte, 10)
rand.Read(entropy)
_, err := rand.Read(entropy)
if err != nil {
return nil, err
}

rawCommit := append(fingerprint.Bytes(), entropy...)
commit := common.Bytes2Hex(rawCommit)
Expand Down

0 comments on commit 568bfc0

Please sign in to comment.