]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/toss.go
Merge branch 'develop'
[nncp.git] / src / toss.go
index 37acf542d1345b51c6403af06a4b97a215e58762..7537d695d08f5edcb874b72a747cf624fea22ad7 100644 (file)
@@ -38,7 +38,6 @@ import (
        xdr "github.com/davecgh/go-xdr/xdr2"
        "github.com/dustin/go-humanize"
        "github.com/klauspost/compress/zstd"
-       "golang.org/x/crypto/blake2b"
        "golang.org/x/crypto/poly1305"
 )
 
@@ -593,7 +592,7 @@ func (ctx *Ctx) Toss(
                        if noTrns {
                                goto Closing
                        }
-                       dst := new([blake2b.Size256]byte)
+                       dst := new([MTHSize]byte)
                        copy(dst[:], pkt.Path[:int(pkt.PathLen)])
                        nodeId := NodeId(*dst)
                        node, known := ctx.Neigh[nodeId]
@@ -689,7 +688,7 @@ func (ctx *Ctx) AutoToss(
                        default:
                        }
                        time.Sleep(time.Second)
-                       bad = !ctx.Toss(nodeId, nice, false, doSeen, noFile, noFreq, noExec, noTrns)
+                       bad = !ctx.Toss(nodeId, nice, false, doSeen, noFile, noFreq, noExec, noTrns) || bad
                }
        }()
        return finish, badCode