1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 18:13:54 +08:00

refactor: use core.ConfigOption return type

This commit is contained in:
Brian Tiger Chow
2015-01-10 20:20:39 -08:00
parent 7cebb33e81
commit 91808e18f7

View File

@ -22,9 +22,7 @@ import (
var log = eventlog.Logger("epictest")
type ConfigOption func(ctx context.Context) (*core.IpfsNode, error)
func MocknetTestRepo(p peer.ID, h host.Host, conf testutil.LatencyConfig) ConfigOption {
func MocknetTestRepo(p peer.ID, h host.Host, conf testutil.LatencyConfig) core.ConfigOption {
return func(ctx context.Context) (*core.IpfsNode, error) {
const kWriteCacheElems = 100
const alwaysSendToPeer = true
@ -43,7 +41,6 @@ func MocknetTestRepo(p peer.ID, h host.Host, conf testutil.LatencyConfig) Config
if err != nil {
return nil, err
}
return &core.IpfsNode{
Peerstore: h.Peerstore(),
Blockstore: bstore,