Skip to content

Commit fa53a22

Browse files
authored
Merge branch 'staging' into feat/encryption-key
2 parents f8f50eb + 3e3d534 commit fa53a22

File tree

1 file changed

+2
-1
lines changed
  • code/go/0chain.net/blobbercore/allocation

1 file changed

+2
-1
lines changed

code/go/0chain.net/blobbercore/allocation/entity.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99

1010
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/datastore"
1111
"github.com/0chain/blobber/code/go/0chain.net/core/common"
12+
"github.com/0chain/common/core/encryption"
1213
"github.com/0chain/common/core/util/wmpt"
1314
"gorm.io/gorm/clause"
1415

@@ -93,7 +94,7 @@ func (Allocation) TableName() string {
9394
func (a *Allocation) GetTrie() *wmpt.WeightedMerkleTrie {
9495
trie := Repo.getTrie(a.ID)
9596
if trie == nil {
96-
if a.FileMetaRoot == "" {
97+
if a.FileMetaRoot == "" || a.FileMetaRoot == encryption.EmptyHash {
9798
trie = wmpt.New(nil, datastore.GetBlockStore())
9899
} else {
99100
decodedRoot, _ := hex.DecodeString(a.FileMetaRoot)

0 commit comments

Comments
 (0)