set identity on core mock to fix ipns tests

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy 2015-07-27 20:21:29 -07:00 committed by Juan Batiz-Benet
parent 9e4d6e1ee2
commit 3f6cca8a2f

View File

@ -55,6 +55,7 @@ func NewMockNode() (*core.IpfsNode, error) {
nd.Peerstore = peer.NewPeerstore()
nd.Peerstore.AddPrivKey(p, ident.PrivateKey())
nd.Peerstore.AddPubKey(p, ident.PublicKey())
nd.Identity = p
nd.PeerHost, err = mocknet.New(ctx).AddPeer(ident.PrivateKey(), ident.Address()) // effectively offline
if err != nil {