Open
Description
Need re-visit this code and remove if possible. Or move this logic to 1 level down - where can lock+defer unlock
mutex inside 1 func.
isLocked := service.LockMutex(endBlockNr)
if !isLocked {
service.UnlockMutex(false, "", endBlockNr, common.Hash{})
return false, errors.New("whitelisted number or locked sprint number is more than the received end block number")
}
if localEndBlockHash != hash {
service.UnlockMutex(false, "", endBlockNr, common.Hash{})
return false, fmt.Errorf("hash mismatch: localChainHash %s, milestoneHash %s", localEndBlockHash, hash)
}
service.UnlockMutex(true, milestoneId, endBlockNr, localEndBlock.Hash())
Metadata
Metadata
Assignees
Labels
No labels
Activity