21 func (d Dummy) Write(b []byte) (int, error) {
28 func (d Dummy) Reorderable() bool {
34 peerId, _ = IDDecode("ffffffffffffffffffffffffffffffff")
37 Timeout: time.Second * time.Duration(TimeoutDefault),
41 peer = newPeer(true, "foo", Dummy{&ciphertext}, conf, new([SSize]byte))
42 plaintext = make([]byte, 789)
43 ready = make(chan struct{})
51 func BenchmarkEnc(b *testing.B) {
53 for i := 0; i < b.N; i++ {
55 peer.EthProcess(plaintext, ready)
59 func BenchmarkDec(b *testing.B) {
60 peer.EthProcess(plaintext, ready)
61 peer = newPeer(true, "foo", Dummy{nil}, conf, new([SSize]byte))
63 for i := 0; i < b.N; i++ {
64 peer.nonceBucket0 = make(map[uint64]struct{}, 1)
65 peer.nonceBucket1 = make(map[uint64]struct{}, 1)
66 if !peer.PktProcess(ciphertext, Dummy{nil}, ready) {