Fix docsgen, lotus-soup build

This commit is contained in:
Łukasz Magiera
2020-10-09 18:43:22 +02:00
parent 7f7c9e978f
commit ab8286fa38
5 changed files with 60 additions and 7 deletions
+11 -2
View File
@@ -531,13 +531,22 @@ func Repo(r repo.Repo) Option {
}
}
func FullAPI(out *api.FullNode, lite bool) Option {
type FullOption = Option
func Lite(enable bool) FullOption {
return func(s *Settings) error {
s.Lite = enable
return nil
}
}
func FullAPI(out *api.FullNode, fopts ...FullOption) Option {
return Options(
func(s *Settings) error {
s.nodeType = repo.FullNode
s.Lite = lite
return nil
},
Options(fopts...),
func(s *Settings) error {
resAPI := &impl.FullNodeAPI{}
s.invokes[ExtractApiKey] = fx.Populate(resAPI)
+2 -2
View File
@@ -237,7 +237,7 @@ func mockBuilderOpts(t *testing.T, fullOpts []test.FullNodeOpts, storage []test.
}
stop, err := node.New(ctx,
node.FullAPI(&fulls[i].FullNode, fullOpts[i].Lite),
node.FullAPI(&fulls[i].FullNode, node.Lite(fullOpts[i].Lite)),
node.Online(),
node.Repo(repo.NewMemory(nil)),
node.MockHost(mn),
@@ -394,7 +394,7 @@ func mockSbBuilderOpts(t *testing.T, fullOpts []test.FullNodeOpts, storage []tes
}
stop, err := node.New(ctx,
node.FullAPI(&fulls[i].FullNode, fullOpts[i].Lite),
node.FullAPI(&fulls[i].FullNode, node.Lite(fullOpts[i].Lite)),
node.Online(),
node.Repo(repo.NewMemory(nil)),
node.MockHost(mn),