Skip to content

Commit

Permalink
Merge pull request #374 from TRON-US/BTFS-1446
Browse files Browse the repository at this point in the history
rm some unnecessary lock
  • Loading branch information
taiyangc authored Feb 7, 2020
2 parents 64f9c86 + 911794d commit 7a6ffaf
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions core/commands/storage/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,6 @@ func (ss *FileContracts) SetFileHash(fileHash cidlib.Cid) {
}

func (ss *FileContracts) GetFileHash() cidlib.Cid {
ss.Lock()
defer ss.Unlock()

return ss.FileHash
}

Expand Down Expand Up @@ -402,9 +399,6 @@ func (ss *FileContracts) SetStatusWithError(status int, err error) {
}

func (ss *FileContracts) GetStatusAndMessage() (string, string) {
ss.Lock()
defer ss.Unlock()

return ss.Status, ss.StatusMessage
}

Expand Down Expand Up @@ -554,16 +548,10 @@ func (c *Shard) SetState(state int) {
}

func (c *Shard) GetStateStr() string {
c.Lock()
defer c.Unlock()

return StdStateFlow[c.State].State
}

func (c *Shard) GetState() int {
c.Lock()
defer c.Unlock()

return c.State
}

Expand Down

0 comments on commit 7a6ffaf

Please sign in to comment.