]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/govpn/transport_test.go
Replace -noncediff with the hash keeping up to 256 seen nonces
[govpn.git] / src / govpn / transport_test.go
index d12c26dacb68210e1f54ebf8d93ced4580d9eb3f..45f4d01cb6b6997bd871b7d9b6a5df29c87894d0 100644 (file)
@@ -24,7 +24,6 @@ func init() {
        conf = &PeerConf{
                Id:          peerId,
                Timeout:     time.Second * time.Duration(TimeoutDefault),
-               Noncediff:   1,
                NoiseEnable: false,
                CPR:         0,
        }
@@ -62,6 +61,8 @@ func BenchmarkDec(b *testing.B) {
        peer = newPeer(addr, conf, 128, new([SSize]byte))
        b.ResetTimer()
        for i := 0; i < b.N; i++ {
+               peer.nonceBucket0 = make(map[uint64]struct{}, 1)
+               peer.nonceBucket1 = make(map[uint64]struct{}, 1)
                if !peer.UDPProcess(ciphertext, dummy, ready) {
                        b.Fail()
                }