Implement function to migrate actors with only code changes

This commit is contained in:
Geoff Stuart
2022-06-10 15:52:32 -04:00
parent e899f73800
commit b7010c9e60
40 changed files with 586 additions and 30 deletions
+5
View File
@@ -15,6 +15,7 @@ import (
"go.uber.org/fx"
"golang.org/x/xerrors"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-cid"
offline "github.com/ipfs/go-ipfs-exchange-offline"
@@ -261,6 +262,10 @@ func (m *ChainModule) ChainReadObj(ctx context.Context, obj cid.Cid) ([]byte, er
return blk.RawData(), nil
}
func (a *ChainAPI) ChainPutObj(ctx context.Context, obj blocks.Block) error {
return a.ExposedBlockstore.Put(ctx, obj)
}
func (a *ChainAPI) ChainDeleteObj(ctx context.Context, obj cid.Cid) error {
return a.ExposedBlockstore.DeleteBlock(ctx, obj)
}