From eeaa62feecf7717859cc2a65d93ff4165a0764c4 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Wed, 21 Oct 2020 18:29:59 +0900 Subject: [PATCH] add more debug details to multiaddress assertions --- libp2p/multiaddress.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libp2p/multiaddress.nim b/libp2p/multiaddress.nim index 859c119bf..2b2c712f6 100644 --- a/libp2p/multiaddress.nim +++ b/libp2p/multiaddress.nim @@ -855,11 +855,11 @@ proc init*(mtype: typedesc[MultiAddress], data.write(familyProto.mcodec) var written = familyProto.coder.stringToBuffer($address, data) doAssert written, - "Merely writing a string to a buffer should always be possible" + "Merely writing a string to a buffer should always be possible, address: " & $address data.write(protoProto.mcodec) written = protoProto.coder.stringToBuffer($port, data) doAssert written, - "Merely writing a string to a buffer should always be possible" + "Merely writing a string to a buffer should always be possible, port: " & $address data.finish() MultiAddress(data: data)