Skip to content

Commit

Permalink
uploader.go (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
offensif authored Feb 15, 2025
1 parent ed81c0a commit 9d17066
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions transfer/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func NewUploader(ctx context.Context, w3Client *web3go.Client, clients []*node.Z
return uploader, nil
}

func checkLogExistance(ctx context.Context, clients []*node.ZgsClient, root common.Hash) (*node.FileInfo, error) {
func checkLogExistence(ctx context.Context, clients []*node.ZgsClient, root common.Hash) (*node.FileInfo, error) {
var info *node.FileInfo
var err error
for _, client := range clients {
Expand Down Expand Up @@ -262,8 +262,8 @@ func (uploader *Uploader) BatchUpload(ctx context.Context, datas []core.Iterable
trees[i] = tree
dataRoots[i] = trees[i].Root()

// Check existance
info, err := checkLogExistance(ctx, uploader.clients, trees[i].Root())
// Check existence
info, err := checkLogExistence(ctx, uploader.clients, trees[i].Root())
if err != nil {
errs <- errors.WithMessage(err, "Failed to check if skipped log entry available on storage node")
return
Expand Down Expand Up @@ -370,8 +370,8 @@ func (uploader *Uploader) Upload(ctx context.Context, data core.IterableData, op
}
uploader.logger.WithField("root", tree.Root()).Info("Data merkle root calculated")

// Check existance
info, err := checkLogExistance(ctx, uploader.clients, tree.Root())
// Check existence
info, err := checkLogExistence(ctx, uploader.clients, tree.Root())
if err != nil {
return common.Hash{}, tree.Root(), errors.WithMessage(err, "Failed to check if skipped log entry available on storage node")
}
Expand Down

0 comments on commit 9d17066

Please sign in to comment.