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)
|
data.write(familyProto.mcodec)
|
||||||
var written = familyProto.coder.stringToBuffer($address, data)
|
var written = familyProto.coder.stringToBuffer($address, data)
|
||||||
doAssert written,
|
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)
|
data.write(protoProto.mcodec)
|
||||||
written = protoProto.coder.stringToBuffer($port, data)
|
written = protoProto.coder.stringToBuffer($port, data)
|
||||||
doAssert written,
|
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()
|
data.finish()
|
||||||
|
|
||||||
MultiAddress(data: data)
|
MultiAddress(data: data)
|
||||||
|
|
Loading…
Reference in New Issue