mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-01-10 13:06:09 +00:00
ec00c7fc50
* Peer resultification and defect only * Fixing some tests * test fixes * Rename peer into peerid * better result error message in identify * further merge fixes
15 lines
387 B
Nim
15 lines
387 B
Nim
import unittest
|
|
|
|
import ../../libp2p/[peerid, peerinfo,
|
|
crypto/crypto,
|
|
protocols/pubsub/rpc/message,
|
|
protocols/pubsub/rpc/messages]
|
|
|
|
suite "Message":
|
|
test "signature":
|
|
let
|
|
peer = PeerInfo.init(PrivateKey.random(ECDSA).get())
|
|
msg = Message.init(peer, @[], "topic", sign = true)
|
|
|
|
check verify(msg, peer)
|