lotus/api/v0api/v1_wrapper.go

33 lines
668 B
Go
Raw Normal View History

2021-03-23 15:40:22 +00:00
package v0api
import (
"github.com/filecoin-project/lotus/api/v1api"
)
2021-03-23 16:20:56 +00:00
type WrapperV1Full struct {
2021-03-23 15:40:22 +00:00
v1api.FullNode
}
/* example:
- dropped StateGetReceipt
- tsk param for StateSearchMsg
2021-03-23 16:20:56 +00:00
func (w *WrapperV1Full) StateSearchMsg(ctx context.Context, c cid.Cid) (*api.MsgLookup, error) {
2021-03-23 15:40:22 +00:00
return w.FullNode.StateSearchMsg(ctx, c, types.EmptyTSK)
}
2021-03-23 16:20:56 +00:00
func (w *WrapperV1Full) StateGetReceipt(ctx context.Context, cid cid.Cid, key types.TipSetKey) (*types.MessageReceipt, error) {
2021-03-23 15:40:22 +00:00
m, err := w.FullNode.StateSearchMsg(ctx, cid, key)
if err != nil {
return nil, err
}
if m == nil {
return nil, nil
}
return &m.Receipt, nil
}*/
2021-03-23 16:20:56 +00:00
var _ FullNode = &WrapperV1Full{}