return bytes.Compare(hsh.Sum(nil), checksum) == 0, nil
}
-func (ctx *Ctx) checkXx(nodeId *NodeId, xx TRxTx) bool {
+func (ctx *Ctx) checkXxIsBad(nodeId *NodeId, xx TRxTx) bool {
isBad := false
for job := range ctx.Jobs(nodeId, xx) {
sds := SDS{
job.Fd.Close()
if err != nil {
ctx.LogE("check", SdsAdd(sds, SDS{"err": err}), "")
- return false
+ return true
}
if !gut {
isBad = true
}
func (ctx *Ctx) Check(nodeId *NodeId) bool {
- return ctx.checkXx(nodeId, TRx) || ctx.checkXx(nodeId, TTx)
+ return !(ctx.checkXxIsBad(nodeId, TRx) || ctx.checkXxIsBad(nodeId, TTx))
}