return !(ctx.checkXxIsBad(nodeId, TRx) || ctx.checkXxIsBad(nodeId, TTx))
}
-func (ctx *Ctx) CheckNoCK(nodeId *NodeId, hshValue *[MTHSize]byte, mth *MTH) (int64, error) {
+func (ctx *Ctx) CheckNoCK(nodeId *NodeId, hshValue *[MTHSize]byte, mth MTH) (int64, error) {
dirToSync := filepath.Join(ctx.Spool, nodeId.String(), string(TRx))
pktName := Base32Codec.EncodeToString(hshValue[:])
pktPath := filepath.Join(dirToSync, pktName)
if mth == nil {
gut, err = Check(fd, size, hshValue[:], les, ctx.ShowPrgrs)
} else {
- mth.PktName = pktName
- if _, err = mth.PrependFrom(bufio.NewReaderSize(fd, MTHSize)); err != nil {
+ if _, err = mth.PreaddFrom(
+ bufio.NewReaderSize(fd, MTHSize),
+ pktName, ctx.ShowPrgrs,
+ ); err != nil {
return 0, err
}
if bytes.Compare(mth.Sum(nil), hshValue[:]) == 0 {