[#38] node: Fix linter warnings

Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
Pavel Karpy 2023-01-31 18:27:58 +03:00
parent 2540598779
commit 0940412f2c
3 changed files with 4 additions and 14 deletions

View file

@ -23,14 +23,8 @@ import (
const (
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.
notaryDepositRetriesAmount
notaryDepositRetriesAmount = 300
)
func initMorphComponents(c *cfg) {

View file

@ -247,9 +247,11 @@ func (t *FSTree) Put(prm common.PutPrm) (common.PutRes, error) {
err = common.ErrNoSpace
_ = 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 {

View file

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