aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/rlpx_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-19 22:11:02 +0800
committerFelix Lange <fjl@twurst.com>2015-03-19 22:11:02 +0800
commit5ba51594c7eb1f04b3636e6413de6d4eb70228d2 (patch)
tree71614118e0026a69c72f4f900a51c26055f00167 /p2p/rlpx_test.go
parent4811f460e7aad37c6c6867df0461a5fa162b5f2c (diff)
downloaddexon-5ba51594c7eb1f04b3636e6413de6d4eb70228d2.tar.gz
dexon-5ba51594c7eb1f04b3636e6413de6d4eb70228d2.tar.zst
dexon-5ba51594c7eb1f04b3636e6413de6d4eb70228d2.zip
p2p: use package rlp to encode messages
Message encoding functions have been renamed to catch any uses. The switch to the new encoder can cause subtle incompatibilities. If there are any users outside of our tree, they will at least be alerted that there was a change. NewMsg no longer exists. The replacements for EncodeMsg are called Send and SendItems.
Diffstat (limited to 'p2p/rlpx_test.go')
-rw-r--r--p2p/rlpx_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/p2p/rlpx_test.go b/p2p/rlpx_test.go
index 49354c7ed..d98f1c2cd 100644
--- a/p2p/rlpx_test.go
+++ b/p2p/rlpx_test.go
@@ -30,7 +30,7 @@ ba628a4ba590cb43f7848f41c4382885
`)
// Check WriteMsg. This puts a message into the buffer.
- if err := EncodeMsg(rw, 8, 1, 2, 3, 4); err != nil {
+ if err := Send(rw, 8, []uint{1, 2, 3, 4}); err != nil {
t.Fatalf("WriteMsg error: %v", err)
}
written := buf.Bytes()
@@ -102,7 +102,7 @@ func TestRlpxFrameRW(t *testing.T) {
for i := 0; i < 10; i++ {
// write message into conn buffer
wmsg := []interface{}{"foo", "bar", strings.Repeat("test", i)}
- err := EncodeMsg(rw1, uint64(i), wmsg...)
+ err := Send(rw1, uint64(i), wmsg)
if err != nil {
t.Fatalf("WriteMsg error (i=%d): %v", i, err)
}