Remove ChainPutMany
This commit is contained in:
parent
64d62f1f7e
commit
801c670edd
@ -40,7 +40,6 @@ type ChainIO interface {
|
|||||||
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
||||||
ChainPutObj(context.Context, blocks.Block) error
|
ChainPutObj(context.Context, blocks.Block) error
|
||||||
ChainPutMany(context.Context, []blocks.Block) error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const LookbackNoLimit = abi.ChainEpoch(-1)
|
const LookbackNoLimit = abi.ChainEpoch(-1)
|
||||||
@ -129,9 +128,6 @@ type FullNode interface {
|
|||||||
// ChainPutObj puts a given object into the block store
|
// ChainPutObj puts a given object into the block store
|
||||||
ChainPutObj(context.Context, blocks.Block) error //perm:admin
|
ChainPutObj(context.Context, blocks.Block) error //perm:admin
|
||||||
|
|
||||||
// ChainPutMany puts a given array of objects into the block store
|
|
||||||
ChainPutMany(context.Context, []blocks.Block) error //perm:admin
|
|
||||||
|
|
||||||
// ChainStatObj returns statistics about the graph referenced by 'obj'.
|
// ChainStatObj returns statistics about the graph referenced by 'obj'.
|
||||||
// If 'base' is also specified, then the returned stat will be a diff
|
// If 'base' is also specified, then the returned stat will be a diff
|
||||||
// between the two objects.
|
// between the two objects.
|
||||||
|
@ -32,7 +32,6 @@ import (
|
|||||||
type Gateway interface {
|
type Gateway interface {
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
||||||
ChainPutObj(context.Context, blocks.Block) error
|
ChainPutObj(context.Context, blocks.Block) error
|
||||||
ChainPutMany(context.Context, []blocks.Block) error
|
|
||||||
ChainHead(ctx context.Context) (*types.TipSet, error)
|
ChainHead(ctx context.Context) (*types.TipSet, error)
|
||||||
ChainGetParentMessages(context.Context, cid.Cid) ([]Message, error)
|
ChainGetParentMessages(context.Context, cid.Cid) ([]Message, error)
|
||||||
ChainGetParentReceipts(context.Context, cid.Cid) ([]*types.MessageReceipt, error)
|
ChainGetParentReceipts(context.Context, cid.Cid) ([]*types.MessageReceipt, error)
|
||||||
|
@ -375,20 +375,6 @@ func (mr *MockFullNodeMockRecorder) ChainNotify(arg0 interface{}) *gomock.Call {
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainNotify", reflect.TypeOf((*MockFullNode)(nil).ChainNotify), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainNotify", reflect.TypeOf((*MockFullNode)(nil).ChainNotify), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChainPutMany mocks base method.
|
|
||||||
func (m *MockFullNode) ChainPutMany(arg0 context.Context, arg1 []blocks.Block) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "ChainPutMany", arg0, arg1)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChainPutMany indicates an expected call of ChainPutMany.
|
|
||||||
func (mr *MockFullNodeMockRecorder) ChainPutMany(arg0, arg1 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainPutMany", reflect.TypeOf((*MockFullNode)(nil).ChainPutMany), arg0, arg1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChainPutObj mocks base method.
|
// ChainPutObj mocks base method.
|
||||||
func (m *MockFullNode) ChainPutObj(arg0 context.Context, arg1 blocks.Block) error {
|
func (m *MockFullNode) ChainPutObj(arg0 context.Context, arg1 blocks.Block) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
|
@ -49,8 +49,6 @@ type ChainIOStruct struct {
|
|||||||
Internal struct {
|
Internal struct {
|
||||||
ChainHasObj func(p0 context.Context, p1 cid.Cid) (bool, error) ``
|
ChainHasObj func(p0 context.Context, p1 cid.Cid) (bool, error) ``
|
||||||
|
|
||||||
ChainPutMany func(p0 context.Context, p1 []blocks.Block) error ``
|
|
||||||
|
|
||||||
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
|
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
|
||||||
|
|
||||||
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) ``
|
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) ``
|
||||||
@ -146,8 +144,6 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
ChainNotify func(p0 context.Context) (<-chan []*HeadChange, error) `perm:"read"`
|
ChainNotify func(p0 context.Context) (<-chan []*HeadChange, error) `perm:"read"`
|
||||||
|
|
||||||
ChainPutMany func(p0 context.Context, p1 []blocks.Block) error `perm:"admin"`
|
|
||||||
|
|
||||||
ChainPutObj func(p0 context.Context, p1 blocks.Block) error `perm:"admin"`
|
ChainPutObj func(p0 context.Context, p1 blocks.Block) error `perm:"admin"`
|
||||||
|
|
||||||
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) `perm:"read"`
|
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) `perm:"read"`
|
||||||
@ -520,8 +516,6 @@ type GatewayStruct struct {
|
|||||||
|
|
||||||
ChainNotify func(p0 context.Context) (<-chan []*HeadChange, error) ``
|
ChainNotify func(p0 context.Context) (<-chan []*HeadChange, error) ``
|
||||||
|
|
||||||
ChainPutMany func(p0 context.Context, p1 []blocks.Block) error ``
|
|
||||||
|
|
||||||
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
|
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
|
||||||
|
|
||||||
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) ``
|
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) ``
|
||||||
@ -990,17 +984,6 @@ func (s *ChainIOStub) ChainHasObj(p0 context.Context, p1 cid.Cid) (bool, error)
|
|||||||
return false, ErrNotSupported
|
return false, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *ChainIOStruct) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
if s.Internal.ChainPutMany == nil {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.ChainPutMany(p0, p1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *ChainIOStub) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *ChainIOStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
func (s *ChainIOStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
||||||
if s.Internal.ChainPutObj == nil {
|
if s.Internal.ChainPutObj == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@ -1342,17 +1325,6 @@ func (s *FullNodeStub) ChainNotify(p0 context.Context) (<-chan []*HeadChange, er
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
if s.Internal.ChainPutMany == nil {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.ChainPutMany(p0, p1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStub) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
func (s *FullNodeStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
||||||
if s.Internal.ChainPutObj == nil {
|
if s.Internal.ChainPutObj == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@ -3344,17 +3316,6 @@ func (s *GatewayStub) ChainNotify(p0 context.Context) (<-chan []*HeadChange, err
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *GatewayStruct) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
if s.Internal.ChainPutMany == nil {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.ChainPutMany(p0, p1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *GatewayStub) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *GatewayStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
func (s *GatewayStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
||||||
if s.Internal.ChainPutObj == nil {
|
if s.Internal.ChainPutObj == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
|
@ -114,9 +114,6 @@ type FullNode interface {
|
|||||||
// ChainPutObj puts and object into the blockstore
|
// ChainPutObj puts and object into the blockstore
|
||||||
ChainPutObj(context.Context, blocks.Block) error
|
ChainPutObj(context.Context, blocks.Block) error
|
||||||
|
|
||||||
// ChainPutMany puts an array of objects into the blockstore
|
|
||||||
ChainPutMany(context.Context, []blocks.Block) error
|
|
||||||
|
|
||||||
// ChainHasObj checks if a given CID exists in the chain blockstore.
|
// ChainHasObj checks if a given CID exists in the chain blockstore.
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error) //perm:read
|
ChainHasObj(context.Context, cid.Cid) (bool, error) //perm:read
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ import (
|
|||||||
type Gateway interface {
|
type Gateway interface {
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
||||||
ChainPutObj(context.Context, blocks.Block) error
|
ChainPutObj(context.Context, blocks.Block) error
|
||||||
ChainPutMany(context.Context, []blocks.Block) error
|
|
||||||
ChainHead(ctx context.Context) (*types.TipSet, error)
|
ChainHead(ctx context.Context) (*types.TipSet, error)
|
||||||
ChainGetBlockMessages(context.Context, cid.Cid) (*api.BlockMessages, error)
|
ChainGetBlockMessages(context.Context, cid.Cid) (*api.BlockMessages, error)
|
||||||
ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error)
|
ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error)
|
||||||
|
@ -75,8 +75,6 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
ChainNotify func(p0 context.Context) (<-chan []*api.HeadChange, error) `perm:"read"`
|
ChainNotify func(p0 context.Context) (<-chan []*api.HeadChange, error) `perm:"read"`
|
||||||
|
|
||||||
ChainPutMany func(p0 context.Context, p1 []blocks.Block) error ``
|
|
||||||
|
|
||||||
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
|
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
|
||||||
|
|
||||||
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) `perm:"read"`
|
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) `perm:"read"`
|
||||||
@ -425,8 +423,6 @@ type GatewayStruct struct {
|
|||||||
|
|
||||||
ChainNotify func(p0 context.Context) (<-chan []*api.HeadChange, error) ``
|
ChainNotify func(p0 context.Context) (<-chan []*api.HeadChange, error) ``
|
||||||
|
|
||||||
ChainPutMany func(p0 context.Context, p1 []blocks.Block) error ``
|
|
||||||
|
|
||||||
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
|
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
|
||||||
|
|
||||||
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) ``
|
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) ``
|
||||||
@ -691,17 +687,6 @@ func (s *FullNodeStub) ChainNotify(p0 context.Context) (<-chan []*api.HeadChange
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
if s.Internal.ChainPutMany == nil {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.ChainPutMany(p0, p1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStub) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
func (s *FullNodeStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
||||||
if s.Internal.ChainPutObj == nil {
|
if s.Internal.ChainPutObj == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
@ -2561,17 +2546,6 @@ func (s *GatewayStub) ChainNotify(p0 context.Context) (<-chan []*api.HeadChange,
|
|||||||
return nil, ErrNotSupported
|
return nil, ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *GatewayStruct) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
if s.Internal.ChainPutMany == nil {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.ChainPutMany(p0, p1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *GatewayStub) ChainPutMany(p0 context.Context, p1 []blocks.Block) error {
|
|
||||||
return ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *GatewayStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
func (s *GatewayStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
|
||||||
if s.Internal.ChainPutObj == nil {
|
if s.Internal.ChainPutObj == nil {
|
||||||
return ErrNotSupported
|
return ErrNotSupported
|
||||||
|
@ -378,20 +378,6 @@ func (mr *MockFullNodeMockRecorder) ChainNotify(arg0 interface{}) *gomock.Call {
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainNotify", reflect.TypeOf((*MockFullNode)(nil).ChainNotify), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainNotify", reflect.TypeOf((*MockFullNode)(nil).ChainNotify), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChainPutMany mocks base method.
|
|
||||||
func (m *MockFullNode) ChainPutMany(arg0 context.Context, arg1 []blocks.Block) error {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "ChainPutMany", arg0, arg1)
|
|
||||||
ret0, _ := ret[0].(error)
|
|
||||||
return ret0
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChainPutMany indicates an expected call of ChainPutMany.
|
|
||||||
func (mr *MockFullNodeMockRecorder) ChainPutMany(arg0, arg1 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainPutMany", reflect.TypeOf((*MockFullNode)(nil).ChainPutMany), arg0, arg1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChainPutObj mocks base method.
|
// ChainPutObj mocks base method.
|
||||||
func (m *MockFullNode) ChainPutObj(arg0 context.Context, arg1 blocks.Block) error {
|
func (m *MockFullNode) ChainPutObj(arg0 context.Context, arg1 blocks.Block) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
|
@ -12,7 +12,6 @@ type ChainIO interface {
|
|||||||
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
||||||
ChainPutObj(context.Context, blocks.Block) error
|
ChainPutObj(context.Context, blocks.Block) error
|
||||||
ChainPutMany(context.Context, []blocks.Block) error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type apiBlockstore struct {
|
type apiBlockstore struct {
|
||||||
@ -56,7 +55,13 @@ func (a *apiBlockstore) Put(ctx context.Context, block blocks.Block) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *apiBlockstore) PutMany(ctx context.Context, blocks []blocks.Block) error {
|
func (a *apiBlockstore) PutMany(ctx context.Context, blocks []blocks.Block) error {
|
||||||
return a.api.ChainPutMany(ctx, blocks)
|
for _, block := range blocks {
|
||||||
|
err := a.api.ChainPutObj(ctx, block)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *apiBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
|
func (a *apiBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1431,7 +1431,7 @@ func upgradeActorsV8Common(
|
|||||||
return newRoot, nil
|
return newRoot, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func UpgradeActorsCode(ctx context.Context, sm *stmgr.StateManager, newActorsManifestCid cid.Cid, root cid.Cid, av actors.Version, oldStateTreeVersion types.StateTreeVersion, newStateTreeVersion types.StateTreeVersion) (cid.Cid, error) { // nolint
|
func UpgradeActorsCode(ctx context.Context, sm *stmgr.StateManager, newActorsManifestCid cid.Cid, root cid.Cid, av actors.Version, oldStateTreeVersion types.StateTreeVersion, newStateTreeVersion types.StateTreeVersion) (cid.Cid, error) {
|
||||||
bstore := sm.ChainStore().StateBlockstore()
|
bstore := sm.ChainStore().StateBlockstore()
|
||||||
return LiteMigration(ctx, bstore, newActorsManifestCid, root, av, oldStateTreeVersion, newStateTreeVersion)
|
return LiteMigration(ctx, bstore, newActorsManifestCid, root, av, oldStateTreeVersion, newStateTreeVersion)
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,6 @@ func (m *MockAPI) ChainPutObj(ctx context.Context, block blocks.Block) error {
|
|||||||
return m.bs.Put(ctx, block)
|
return m.bs.Put(ctx, block)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MockAPI) ChainPutMany(ctx context.Context, blocks []blocks.Block) error {
|
|
||||||
return m.bs.PutMany(ctx, blocks)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *MockAPI) StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error) {
|
func (m *MockAPI) StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error) {
|
||||||
m.lk.Lock()
|
m.lk.Lock()
|
||||||
defer m.lk.Unlock()
|
defer m.lk.Unlock()
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
* [ChainHasObj](#ChainHasObj)
|
* [ChainHasObj](#ChainHasObj)
|
||||||
* [ChainHead](#ChainHead)
|
* [ChainHead](#ChainHead)
|
||||||
* [ChainNotify](#ChainNotify)
|
* [ChainNotify](#ChainNotify)
|
||||||
* [ChainPutMany](#ChainPutMany)
|
|
||||||
* [ChainPutObj](#ChainPutObj)
|
* [ChainPutObj](#ChainPutObj)
|
||||||
* [ChainReadObj](#ChainReadObj)
|
* [ChainReadObj](#ChainReadObj)
|
||||||
* [ChainSetHead](#ChainSetHead)
|
* [ChainSetHead](#ChainSetHead)
|
||||||
@ -973,23 +972,6 @@ Response:
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
### ChainPutMany
|
|
||||||
ChainPutMany puts an array of objects into the blockstore
|
|
||||||
|
|
||||||
|
|
||||||
Perms:
|
|
||||||
|
|
||||||
Inputs:
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
[
|
|
||||||
{}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Response: `{}`
|
|
||||||
|
|
||||||
### ChainPutObj
|
### ChainPutObj
|
||||||
ChainPutObj puts and object into the blockstore
|
ChainPutObj puts and object into the blockstore
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
* [ChainHasObj](#ChainHasObj)
|
* [ChainHasObj](#ChainHasObj)
|
||||||
* [ChainHead](#ChainHead)
|
* [ChainHead](#ChainHead)
|
||||||
* [ChainNotify](#ChainNotify)
|
* [ChainNotify](#ChainNotify)
|
||||||
* [ChainPutMany](#ChainPutMany)
|
|
||||||
* [ChainPutObj](#ChainPutObj)
|
* [ChainPutObj](#ChainPutObj)
|
||||||
* [ChainReadObj](#ChainReadObj)
|
* [ChainReadObj](#ChainReadObj)
|
||||||
* [ChainSetHead](#ChainSetHead)
|
* [ChainSetHead](#ChainSetHead)
|
||||||
@ -961,23 +960,6 @@ Response:
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
### ChainPutMany
|
|
||||||
ChainPutMany puts a given array of objects into the block store
|
|
||||||
|
|
||||||
|
|
||||||
Perms: admin
|
|
||||||
|
|
||||||
Inputs:
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
[
|
|
||||||
{}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Response: `{}`
|
|
||||||
|
|
||||||
### ChainPutObj
|
### ChainPutObj
|
||||||
ChainPutObj puts a given object into the block store
|
ChainPutObj puts a given object into the block store
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@ type TargetAPI interface {
|
|||||||
ChainGetPath(ctx context.Context, from, to types.TipSetKey) ([]*api.HeadChange, error)
|
ChainGetPath(ctx context.Context, from, to types.TipSetKey) ([]*api.HeadChange, error)
|
||||||
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
||||||
ChainPutObj(context.Context, blocks.Block) error
|
ChainPutObj(context.Context, blocks.Block) error
|
||||||
ChainPutMany(context.Context, []blocks.Block) error
|
|
||||||
ChainGetGenesis(context.Context) (*types.TipSet, error)
|
ChainGetGenesis(context.Context) (*types.TipSet, error)
|
||||||
GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec, tsk types.TipSetKey) (*types.Message, error)
|
GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec, tsk types.TipSetKey) (*types.Message, error)
|
||||||
MpoolPushUntrusted(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error)
|
MpoolPushUntrusted(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error)
|
||||||
@ -258,10 +257,6 @@ func (gw *Node) ChainPutObj(context.Context, blocks.Block) error {
|
|||||||
return xerrors.New("not supported")
|
return xerrors.New("not supported")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gw *Node) ChainPutMany(context.Context, []blocks.Block) error {
|
|
||||||
return xerrors.New("not supported")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (gw *Node) GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec, tsk types.TipSetKey) (*types.Message, error) {
|
func (gw *Node) GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec, tsk types.TipSetKey) (*types.Message, error) {
|
||||||
if err := gw.checkTipsetKey(ctx, tsk); err != nil {
|
if err := gw.checkTipsetKey(ctx, tsk); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -22,7 +22,6 @@ type apiWrapper struct {
|
|||||||
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
||||||
ChainPutObj(context.Context, blocks.Block) error
|
ChainPutObj(context.Context, blocks.Block) error
|
||||||
ChainPutMany(context.Context, []blocks.Block) error
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,10 +266,6 @@ func (a *ChainAPI) ChainPutObj(ctx context.Context, obj blocks.Block) error {
|
|||||||
return a.ExposedBlockstore.Put(ctx, obj)
|
return a.ExposedBlockstore.Put(ctx, obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *ChainAPI) ChainPutMany(ctx context.Context, objs []blocks.Block) error {
|
|
||||||
return a.ExposedBlockstore.PutMany(ctx, objs)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *ChainAPI) ChainDeleteObj(ctx context.Context, obj cid.Cid) error {
|
func (a *ChainAPI) ChainDeleteObj(ctx context.Context, obj cid.Cid) error {
|
||||||
return a.ExposedBlockstore.DeleteBlock(ctx, obj)
|
return a.ExposedBlockstore.DeleteBlock(ctx, obj)
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,6 @@ type fullNodeFilteredAPI interface {
|
|||||||
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
|
||||||
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
ChainHasObj(context.Context, cid.Cid) (bool, error)
|
||||||
ChainPutObj(context.Context, blocks.Block) error
|
ChainPutObj(context.Context, blocks.Block) error
|
||||||
ChainPutMany(context.Context, []blocks.Block) error
|
|
||||||
ChainGetTipSet(ctx context.Context, key types.TipSetKey) (*types.TipSet, error)
|
ChainGetTipSet(ctx context.Context, key types.TipSetKey) (*types.TipSet, error)
|
||||||
|
|
||||||
WalletSign(context.Context, address.Address, []byte) (*crypto.Signature, error)
|
WalletSign(context.Context, address.Address, []byte) (*crypto.Signature, error)
|
||||||
|
Loading…
Reference in New Issue
Block a user