Skip to content

Commit

Permalink
providers: Cleanup after rebase
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>
  • Loading branch information
magik6k committed Mar 26, 2018
1 parent e71ce0e commit 0015e1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ You can now check what blocks have been created by:
}

if !local {
if err := n.Providers.ProvideRecursive(req.Context(), nd, dserv); err != nil {
if err := n.Providers.ProvideRecursive(req.Context, nd, dserv); err != nil {
return err
}
}
Expand Down
4 changes: 3 additions & 1 deletion providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const (

var (
provideKeysBufferSize = 2048

// HasBlockBufferSize is the maximum numbers of CIDs that will get buffered
// for providing
HasBlockBufferSize = 256
Expand All @@ -45,7 +46,7 @@ type blockRequest struct {
Ctx context.Context
}

// Interface is an definition of providers interface to libp2p routing system
// Interface defines providers interface to libp2p routing system
type Interface interface {
Provide(k *cid.Cid) error
ProvideRecursive(ctx context.Context, n ipld.Node, serv ipld.NodeGetter) error
Expand All @@ -65,6 +66,7 @@ type providers struct {
// network. blocks pushed down this channel get buffered and fed to the
// provideKeys channel later on to avoid too much network activity
newBlocks chan *cid.Cid

// provideKeys directly feeds provide workers
provideKeys chan *cid.Cid

Expand Down

0 comments on commit 0015e1a

Please sign in to comment.