From 4ed877efbc21aaf8b5e58b3508489f7f0dae7531 Mon Sep 17 00:00:00 2001 From: 9seconds Date: Thu, 5 Jul 2018 11:25:43 +0300 Subject: [PATCH] Fix cyrpt test --- mtproto/wrappers/crypt_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mtproto/wrappers/crypt_test.go b/mtproto/wrappers/crypt_test.go index 921ad49..c9914f2 100644 --- a/mtproto/wrappers/crypt_test.go +++ b/mtproto/wrappers/crypt_test.go @@ -27,8 +27,11 @@ func TestMakeKeys(t *testing.T) { copy(req.Nonce[:], []byte{24, 49, 53, 111, 198, 10, 235, 180, 230, 112, 92, 78, 1, 201, 106, 105}) binary.LittleEndian.PutUint32(req.CryptoTS[:], 1528396015) - resp := &rpc.NonceResponse{} - copy(resp.Nonce[:], []byte{247, 40, 210, 56, 65, 12, 101, 170, 216, 155, 14, 253, 250, 238, 219, 226}) + resp := &rpc.NonceResponse{ + NonceRequest: rpc.NonceRequest{ + Nonce: []byte{247, 40, 210, 56, 65, 12, 101, 170, 216, 155, 14, 253, 250, 238, 219, 226}, + }, + } cltAddr := &net.TCPAddr{ IP: net.ParseIP("80.211.29.34"),