Fix linter warnings #38

Merged
carpawell merged 1 commit from fix-linter into master 2023-02-06 14:27:54 +00:00
3 changed files with 4 additions and 14 deletions

View file

@ -23,14 +23,8 @@ import (
const ( const (
newEpochNotification = "NewEpoch" newEpochNotification = "NewEpoch"
// notaryDepositExtraBlocks is the amount of extra blocks to overlap two deposits,
// we do that to make sure that there won't be any blocks without deposited
// assets in a notary contract; make sure it is bigger than any extra rounding
// value in a notary client.
notaryDepositExtraBlocks = 300
// amount of tries(blocks) before notary deposit timeout. // amount of tries(blocks) before notary deposit timeout.
notaryDepositRetriesAmount notaryDepositRetriesAmount = 300
) )
func initMorphComponents(c *cfg) { func initMorphComponents(c *cfg) {

View file

@ -247,9 +247,11 @@ func (t *FSTree) Put(prm common.PutPrm) (common.PutRes, error) {
err = common.ErrNoSpace err = common.ErrNoSpace
_ = os.RemoveAll(tmpPath) _ = os.RemoveAll(tmpPath)
} }
} else {
err = os.Rename(tmpPath, p)
} }
return common.PutRes{StorageID: []byte{}}, os.Rename(tmpPath, p) return common.PutRes{StorageID: []byte{}}, err
} }
func (t *FSTree) writeFlags() int { func (t *FSTree) writeFlags() int {

View file

@ -933,9 +933,3 @@ func internalKey(key []byte, k, v string, parent, node Node) []byte {
key = append(key, raw[:]...) key = append(key, raw[:]...)
return key return key
} }
func toUint64(x uint64) []byte {
var a [8]byte
binary.LittleEndian.PutUint64(a[:], x)
return a[:]
}