plumb contexts in lotus-miner

This commit is contained in:
vyzo
2022-01-11 19:53:49 -05:00
committed by Jennifer Wang
parent 35b8516288
commit 074f3850d8
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -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
}
+1 -1
View File
@@ -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)
}