diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index d815d4c30..7a3c20484 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -1,4 +1,4 @@ -name: Benchmark tests +name: Benchmark concurrency: group: "benchmark-${{ github.ref }}" diff --git a/code/go/0chain.net/blobbercore/filestore/fs_store.go b/code/go/0chain.net/blobbercore/filestore/fs_store.go index 0dc6c2572..33d0b9f3c 100644 --- a/code/go/0chain.net/blobbercore/filestore/fs_store.go +++ b/code/go/0chain.net/blobbercore/filestore/fs_store.go @@ -3,7 +3,7 @@ package filestore import ( "bytes" "context" - "crypto/sha1" + "crypto/sha256" "encoding/hex" "encoding/json" "fmt" @@ -475,7 +475,7 @@ func (fs *FileFSStore) WriteFile(allocationID string, fileData *FileInputData, fileRef := &FileOutputData{} - h := sha1.New() + h := sha256.New() bytesBuffer := bytes.NewBuffer(nil) multiHashWriter := io.MultiWriter(h, bytesBuffer) tReader := io.TeeReader(infile, multiHashWriter) @@ -548,7 +548,7 @@ func (fs *FileFSStore) WriteChunk(allocationID string, fileData *FileInputData, fileRef.ChunkUploaded = true } - h := sha1.New() + h := sha256.New() size, err := dest.WriteChunk(context.TODO(), fileData.UploadOffset, io.TeeReader(infile, h)) if err != nil { @@ -576,7 +576,7 @@ func (fs *FileFSStore) IterateObjects(allocationID string, handler FileObjectHan return nil } defer f.Close() - h := sha1.New() + h := sha256.New() if _, err := io.Copy(h, f); err != nil { return nil } diff --git a/code/go/0chain.net/blobbercore/filestore/mock_store.go b/code/go/0chain.net/blobbercore/filestore/mock_store.go index fcda9fc75..1b87ff6af 100644 --- a/code/go/0chain.net/blobbercore/filestore/mock_store.go +++ b/code/go/0chain.net/blobbercore/filestore/mock_store.go @@ -1,7 +1,7 @@ package filestore import ( - "crypto/sha1" + "crypto/sha256" "encoding/hex" "encoding/json" "io" @@ -31,7 +31,7 @@ func (ms *MockStore) WriteFile(allocationID string, fileData *FileInputData, inf fileRef.ChunkUploaded = true - h := sha1.New() + h := sha256.New() reader := io.TeeReader(infile, h) fileSize := int64(0) for {