From 04c95cb7b0a13f5da1ea513a770b037379f7bd13 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Sat, 31 Oct 2020 03:23:34 +0200 Subject: [PATCH] Fix write should be writeArray. --- libp2p/multiaddress.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/multiaddress.nim b/libp2p/multiaddress.nim index 3754a47ba..e313fba45 100644 --- a/libp2p/multiaddress.nim +++ b/libp2p/multiaddress.nim @@ -856,7 +856,7 @@ proc init*(mtype: typedesc[MultiAddress], address: ValidIpAddress, of IpAddressFamily.IPv4: res.data.writeArray(address.address_v4) of IpAddressFamily.IPv6: res.data.writeArray(address.address_v6) res.data.write(transportProto.mcodec) - res.data.write(toBytesBE(uint16(port))) + res.data.writeArray(toBytesBE(uint16(port))) res.data.finish() ok(res)