mirror of https://github.com/vacp2p/nim-libp2p.git
add more debug details to multiaddress assertions
This commit is contained in:
parent
462da1f7a8
commit
eeaa62feec
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue