Skip to content

Commit

Permalink
Merge pull request #3633 from nspcc-dev/fix-empty-obj-uploading
Browse files Browse the repository at this point in the history
cli: fix empty block uploading in `util upload-bin`
  • Loading branch information
AnnaShaleva authored Oct 22, 2024
2 parents 29bb3ff + e00d7fe commit a0def2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/util/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ func uploadBin(ctx *cli.Context) error {
*object.NewAttribute("timestamp", strconv.FormatUint(blk.Timestamp, 10)),
}

objBytes := bw.Bytes()
err = retry(func() error {
return uploadObj(ctx.Context, p, signer, acc.PrivateKey().GetScriptHash(), containerID, bw.Bytes(), attrs, homomorphicHashingDisabled)
return uploadObj(ctx.Context, p, signer, acc.PrivateKey().GetScriptHash(), containerID, objBytes, attrs, homomorphicHashingDisabled)
})
if err != nil {
select {
Expand Down

0 comments on commit a0def2e

Please sign in to comment.