Merge pull request #5538 from filecoin-project/feat/deal-publisher-force
add commands to list pending deals and force publish
This commit is contained in:
+14
-3
@@ -32,6 +32,7 @@ import (
|
||||
"github.com/filecoin-project/lotus/api"
|
||||
"github.com/filecoin-project/lotus/api/apistruct"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/markets/storageadapter"
|
||||
"github.com/filecoin-project/lotus/miner"
|
||||
"github.com/filecoin-project/lotus/node/impl/common"
|
||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||
@@ -55,9 +56,10 @@ type StorageMinerAPI struct {
|
||||
IStorageMgr sectorstorage.SectorManager
|
||||
*stores.Index
|
||||
storiface.WorkerReturn
|
||||
DataTransfer dtypes.ProviderDataTransfer
|
||||
Host host.Host
|
||||
AddrSel *storage.AddressSelector
|
||||
DataTransfer dtypes.ProviderDataTransfer
|
||||
Host host.Host
|
||||
AddrSel *storage.AddressSelector
|
||||
DealPublisher *storageadapter.DealPublisher
|
||||
|
||||
DS dtypes.MetadataDS
|
||||
|
||||
@@ -501,6 +503,15 @@ func (sm *StorageMinerAPI) MarketDataTransferUpdates(ctx context.Context) (<-cha
|
||||
return channels, nil
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) MarketPendingDeals(ctx context.Context) (api.PendingDealInfo, error) {
|
||||
return sm.DealPublisher.PendingDeals(), nil
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) MarketPublishPendingDeals(ctx context.Context) error {
|
||||
sm.DealPublisher.ForcePublishPendingDeals()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (sm *StorageMinerAPI) DealsList(ctx context.Context) ([]api.MarketDeal, error) {
|
||||
return sm.listDeals(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user