21 func (d Dummy) Write(b []byte) (int, error) {
30 peerId, _ = IDDecode("ffffffffffffffffffffffffffffffff")
33 Timeout: time.Second * time.Duration(TimeoutDefault),
37 peer = newPeer("foo", Dummy{&ciphertext}, conf, 128, new([SSize]byte))
38 plaintext = make([]byte, 789)
39 ready = make(chan struct{})
47 func BenchmarkEnc(b *testing.B) {
49 for i := 0; i < b.N; i++ {
51 peer.EthProcess(plaintext, ready)
55 func BenchmarkDec(b *testing.B) {
56 peer.EthProcess(plaintext, ready)
57 peer = newPeer("foo", Dummy{nil}, conf, 128, new([SSize]byte))
59 for i := 0; i < b.N; i++ {
60 peer.nonceBucket0 = make(map[uint64]struct{}, 1)
61 peer.nonceBucket1 = make(map[uint64]struct{}, 1)
62 if !peer.PktProcess(ciphertext, Dummy{nil}, ready) {