Skip to content

Commit

Permalink
Merge pull request #1668 from 0chain/fix/version-rollback
Browse files Browse the repository at this point in the history
Use allocation txn
  • Loading branch information
dabasov authored Nov 10, 2024
2 parents 1140e00 + 39ea5b9 commit 833564a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion zboxcore/sdk/allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ func (a *Allocation) GetCurrentVersion() (bool, error) {
wg.Add(1)
go func(rb *RollbackBlobber) {
defer wg.Done()
err := rb.processRollback(context.TODO(), a.ID)
err := rb.processRollback(context.TODO(), a.Tx)
if err != nil {
success = false
}
Expand Down
3 changes: 0 additions & 3 deletions zboxcore/sdk/chunked_upload_form_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

"github.com/0chain/gosdk/core/client"
"github.com/0chain/gosdk/core/encryption"
"github.com/0chain/gosdk/zboxcore/logger"

"golang.org/x/crypto/sha3"
)
Expand Down Expand Up @@ -183,14 +182,12 @@ func (b *chunkedUploadFormBuilder) Build(
if err != nil {
return res, err
}
logger.Logger.Info("sign using private signing key: ", formData.SignatureVersion)
formData.ActualFileHashSignature = hex.EncodeToString(sig)
} else {
sig, err := client.Sign(fileMeta.ActualHash)
if err != nil {
return res, err
}
logger.Logger.Info("sign using client: ", formData.SignatureVersion)
formData.ActualFileHashSignature = sig
}
hash := formData.ActualFileHashSignature + formData.ValidationRoot
Expand Down

0 comments on commit 833564a

Please sign in to comment.