diff --git a/cmd/lotus-miner/init.go b/cmd/lotus-miner/init.go index b2199dd94..adc59f0f9 100644 --- a/cmd/lotus-miner/init.go +++ b/cmd/lotus-miner/init.go @@ -347,7 +347,7 @@ func migratePreSealMeta(ctx context.Context, api v1api.FullNode, metadata string return err } - if err := mds.Put(sectorKey, b); err != nil { + if err := mds.Put(context.Background(), sectorKey, b); err != nil { return err } @@ -387,7 +387,7 @@ func migratePreSealMeta(ctx context.Context, api v1api.FullNode, metadata string buf := make([]byte, binary.MaxVarintLen64) size := binary.PutUvarint(buf, uint64(maxSectorID)) - return mds.Put(datastore.NewKey(modules.StorageCounterDSPrefix), buf[:size]) + return mds.Put(context.Background(), datastore.NewKey(modules.StorageCounterDSPrefix), buf[:size]) } func findMarketDealID(ctx context.Context, api v1api.FullNode, deal market2.DealProposal) (abi.DealID, error) { @@ -441,7 +441,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api v1api.FullNode } if cctx.Bool("genesis-miner") { - if err := mds.Put(datastore.NewKey("miner-address"), a.Bytes()); err != nil { + if err := mds.Put(context.Background(), datastore.NewKey("miner-address"), a.Bytes()); err != nil { return err } @@ -548,7 +548,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api v1api.FullNode } log.Infof("Created new miner: %s", addr) - if err := mds.Put(datastore.NewKey("miner-address"), addr.Bytes()); err != nil { + if err := mds.Put(context.Background(), datastore.NewKey("miner-address"), addr.Bytes()); err != nil { return err } diff --git a/cmd/lotus-miner/init_restore.go b/cmd/lotus-miner/init_restore.go index 0974a7c5d..84a2f3838 100644 --- a/cmd/lotus-miner/init_restore.go +++ b/cmd/lotus-miner/init_restore.go @@ -255,7 +255,7 @@ func restore(ctx context.Context, cctx *cli.Context, targetPath string, strConfi log.Info("Checking actor metadata") - abytes, err := mds.Get(datastore.NewKey("miner-address")) + abytes, err := mds.Get(context.Background(), datastore.NewKey("miner-address")) if err != nil { return xerrors.Errorf("getting actor address from metadata datastore: %w", err) }