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

View File

@ -222,7 +222,7 @@ func (tu *syncTestUtil) addSourceNode(gen int) {
var out api.FullNode
stop, err := node.New(tu.ctx,
node.FullAPI(&out, false),
node.FullAPI(&out),
node.Online(),
node.Repo(sourceRepo),
node.MockHost(tu.mn),
@ -254,7 +254,7 @@ func (tu *syncTestUtil) addClientNode() int {
var out api.FullNode
stop, err := node.New(tu.ctx,
node.FullAPI(&out, false),
node.FullAPI(&out),
node.Online(),
node.Repo(repo.NewMemory(nil)),
node.MockHost(tu.mn),

View File

@ -264,7 +264,7 @@ var DaemonCmd = &cli.Command{
var api api.FullNode
stop, err := node.New(ctx,
node.FullAPI(&api, isLite),
node.FullAPI(&api, node.Lite(isLite)),
node.Override(new(dtypes.Bootstrapper), isBootstrapper),
node.Override(new(dtypes.ShutdownChan), shutdownChan),

View File

@ -167,6 +167,7 @@
* [StateVerifiedRegistryRootKey](#StateVerifiedRegistryRootKey)
* [StateVerifierStatus](#StateVerifierStatus)
* [StateWaitMsg](#StateWaitMsg)
* [StateWaitMsgLimited](#StateWaitMsgLimited)
* [Sync](#Sync)
* [SyncCheckBad](#SyncCheckBad)
* [SyncCheckpoint](#SyncCheckpoint)
@ -4322,6 +4323,49 @@ Response:
}
```
### StateWaitMsgLimited
StateWaitMsgLimited looks back up to limit epochs in the chain for a message.
If not found, it blocks until the message arrives on chain, and gets to the
indicated confidence depth.
Perms: read
Inputs:
```json
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
42,
10101
]
```
Response:
```json
{
"Message": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Receipt": {
"ExitCode": 0,
"Return": "Ynl0ZSBhcnJheQ==",
"GasUsed": 9
},
"ReturnDec": {},
"TipSet": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
],
"Height": 10101
}
```
## Sync
The Sync method group contains methods for interacting with and
observing the lotus sync service.

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)

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),