storj/storagenode/testing.go

18 lines
527 B
Go
Raw Normal View History

2019-01-10 13:13:27 +00:00
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package storagenode
import (
"storj.io/storj/pkg/node"
)
// These methods are added to have same interface as in testplanet to make transition easier.
// NewNodeClient creates a node client for this node
// TODO: this is temporary and only intended for tests
func (peer *Peer) NewNodeClient() (node.Client, error) {
// TODO: handle disconnect verification
return node.NewNodeClient(peer.Identity, peer.RoutingTable.Local(), peer.Kademlia)
}