add switch tests to native
This commit is contained in:
parent
0f3d024c0a
commit
ef7a0b41e4
|
@ -68,7 +68,6 @@ proc decodeMsg*(buf: seq[byte]): IdentifyInfo =
|
||||||
address.setLen(0)
|
address.setLen(0)
|
||||||
|
|
||||||
var proto = ""
|
var proto = ""
|
||||||
# var protos: seq[string] = newSeq[string]()
|
|
||||||
while pb.getString(3, proto) > 0:
|
while pb.getString(3, proto) > 0:
|
||||||
result.protos.add(proto)
|
result.protos.add(proto)
|
||||||
proto = "" # TODO: do i need to clear it up?
|
proto = "" # TODO: do i need to clear it up?
|
||||||
|
@ -78,7 +77,6 @@ proc decodeMsg*(buf: seq[byte]): IdentifyInfo =
|
||||||
result.observedAddr = MultiAddress.init(observableAddr)
|
result.observedAddr = MultiAddress.init(observableAddr)
|
||||||
|
|
||||||
discard pb.getString(5, result.protoVersion)
|
discard pb.getString(5, result.protoVersion)
|
||||||
|
|
||||||
discard pb.getString(6, result.agentVersion)
|
discard pb.getString(6, result.agentVersion)
|
||||||
|
|
||||||
method init*(p: Identify) =
|
method init*(p: Identify) =
|
||||||
|
|
|
@ -2,4 +2,4 @@ import unittest
|
||||||
import testvarint, testbase32, testbase58, testbase64
|
import testvarint, testbase32, testbase58, testbase64
|
||||||
import testrsa, testecnist, tested25519, testsecp256k1, testcrypto
|
import testrsa, testecnist, tested25519, testsecp256k1, testcrypto
|
||||||
import testmultibase, testmultihash, testmultiaddress, testcid, testpeer
|
import testmultibase, testmultihash, testmultiaddress, testcid, testpeer
|
||||||
import testidentify, testtransport, testmultistream
|
import testidentify, testtransport, testmultistream, testswitch
|
||||||
|
|
Loading…
Reference in New Issue