]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/tx_test.go
Print debug raw records
[nncp.git] / src / tx_test.go
index 7e07a0524a1d0a5837e7ce9033c2ea229d18e4e4..85a00db69a416bbd6ae19cb6e9e5b569751f026f 100644 (file)
@@ -28,7 +28,6 @@ import (
        "testing/quick"
 
        xdr "github.com/davecgh/go-xdr/xdr2"
-       "golang.org/x/crypto/blake2b"
 )
 
 func TestTx(t *testing.T) {
@@ -85,6 +84,7 @@ func TestTx(t *testing.T) {
                        int64(padSize),
                        src,
                        "pktName",
+                       nil,
                )
                if err != nil {
                        return false
@@ -111,7 +111,9 @@ func TestTx(t *testing.T) {
                vias := append(nodeTgt.Via, nodeTgt.Id)
                for i, hopId := range vias {
                        hopOur := privates[*hopId]
-                       foundNode, _, err := PktEncRead(hopOur, ctx.Neigh, &bufR, &bufW)
+                       _, foundNode, _, err := PktEncRead(
+                               hopOur, ctx.Neigh, &bufR, &bufW, true, nil,
+                       )
                        if err != nil {
                                return false
                        }
@@ -141,7 +143,7 @@ func TestTx(t *testing.T) {
                                if pkt.Type != PktTypeTrns {
                                        return false
                                }
-                               if bytes.Compare(pkt.Path[:blake2b.Size256], vias[i+1][:]) != 0 {
+                               if bytes.Compare(pkt.Path[:MTHSize], vias[i+1][:]) != 0 {
                                        return false
                                }
                        }