diff --git a/core/node/provider.go b/core/node/provider.go index 809c218cf0d..52cc0b074d7 100644 --- a/core/node/provider.go +++ b/core/node/provider.go @@ -63,7 +63,7 @@ func SimpleProviderSys(isOnline bool) interface{} { // BatchedProviderSys creates new provider system func BatchedProviderSys(isOnline bool, reprovideInterval string) interface{} { return func(lc fx.Lifecycle, cr irouting.TieredRouter, q *q.Queue, keyProvider simple.KeyChanFunc, repo repo.Repo) (provider.System, error) { - r := cr.ProviderManyWrapper() + r := cr.ProvideMany() if r == nil { return nil, fmt.Errorf("BatchedProviderSys requires a content router that supports provideMany") } diff --git a/routing/delegated.go b/routing/delegated.go index 6bc023e0e45..b8bf95e5cd6 100644 --- a/routing/delegated.go +++ b/routing/delegated.go @@ -12,7 +12,7 @@ import ( type TieredRouter interface { routing.Routing - ProviderManyWrapper() ProvideMany + ProvideMany() ProvideMany } var _ TieredRouter = &Tiered{} @@ -23,9 +23,9 @@ type Tiered struct { routinghelpers.Tiered } -// ProviderManyWrapper returns a ProviderMany implementation including all Routers that -// implements ProviderMany -func (ds Tiered) ProviderManyWrapper() ProvideMany { +// ProvideMany returns a ProvideMany implementation including all Routers that +// implements ProvideMany +func (ds Tiered) ProvideMany() ProvideMany { var pms []ProvideMany for _, r := range ds.Tiered.Routers { pm, ok := r.(ProvideMany) diff --git a/routing/delegated_test.go b/routing/delegated_test.go index d40c4d6b283..2e96b63665d 100644 --- a/routing/delegated_test.go +++ b/routing/delegated_test.go @@ -71,12 +71,12 @@ func TestTieredRouter(t *testing.T) { }, } - pm := tr.ProviderManyWrapper() + pm := tr.ProvideMany() require.Nil(pm) tr.Tiered.Routers = append(tr.Tiered.Routers, &dummyRouter{}) - pm = tr.ProviderManyWrapper() + pm = tr.ProvideMany() require.NotNil(pm) }