Skip to content

Commit

Permalink
fix delete change
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitenjain14 committed Aug 26, 2023
1 parent dc720eb commit 879915e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/go/0chain.net/blobbercore/allocation/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ func SendCommand(connectionID, pathHash string, cmd FileCommand) error {
}
connChange := connectionProcessor[connectionID].changes[pathHash]
if connChange == nil {
connectionObjMutex.RUnlock()
return common.NewError("connection_change_not_found", "connection change not found")
}
if connChange.isFinalized {
connectionObjMutex.RUnlock()
return common.NewError("connection_change_finalized", "connection change finalized")
}
connectionObjMutex.RUnlock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func (cmd *DeleteFileCommand) ProcessContent(allocationObj *allocation.Allocatio
result.ValidationRoot = cmd.existingFileRef.ValidationRoot
result.FixedMerkleRoot = cmd.existingFileRef.FixedMerkleRoot
result.Size = cmd.existingFileRef.Size
result.IsFinal = true

cmd.allocationChange = &allocation.AllocationChange{}
cmd.allocationChange.ConnectionID = connectionID
Expand Down

0 comments on commit 879915e

Please sign in to comment.