From 07f14f92ed4f79a062946bda6e858164437f16cf Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 4 Aug 2019 15:25:14 -0500 Subject: [PATCH] disable crypto and switch buffer changes from testing --- src/crypto/crypto.go | 4 ++-- src/yggdrasil/switch.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crypto/crypto.go b/src/crypto/crypto.go index 44d2d8e8..e85493f0 100644 --- a/src/crypto/crypto.go +++ b/src/crypto/crypto.go @@ -172,7 +172,7 @@ func BoxOpen(shared *BoxSharedKey, boxed []byte, nonce *BoxNonce) ([]byte, bool) { out := util.GetBytes() - return append(out, boxed...), true //FIXME disabled crypto for benchmarking + //return append(out, boxed...), true //FIXME disabled crypto for benchmarking s := (*[BoxSharedKeyLen]byte)(shared) n := (*[BoxNonceLen]byte)(nonce) unboxed, success := box.OpenAfterPrecomputation(out, boxed, n, s) @@ -185,7 +185,7 @@ func BoxSeal(shared *BoxSharedKey, unboxed []byte, nonce *BoxNonce) ([]byte, *Bo } nonce.Increment() out := util.GetBytes() - return append(out, unboxed...), nonce // FIXME disabled crypto for benchmarking + //return append(out, unboxed...), nonce // FIXME disabled crypto for benchmarking s := (*[BoxSharedKeyLen]byte)(shared) n := (*[BoxNonceLen]byte)(nonce) boxed := box.SealAfterPrecomputation(out, unboxed, n, s) diff --git a/src/yggdrasil/switch.go b/src/yggdrasil/switch.go index 0e11593f..1bc40501 100644 --- a/src/yggdrasil/switch.go +++ b/src/yggdrasil/switch.go @@ -820,7 +820,7 @@ func (t *switchTable) doWorker() { select { case bs := <-t.toRouter: buf = append(buf, bs) - for len(buf) > 32768 { // FIXME realistically don't drop anything, just for testing + for len(buf) > 32 { util.PutBytes(buf[0]) buf = buf[1:] }