diff --git a/storagemarket/impl/providerstates/provider_states_test.go b/storagemarket/impl/providerstates/provider_states_test.go index b2ac756e..6bec0033 100644 --- a/storagemarket/impl/providerstates/provider_states_test.go +++ b/storagemarket/impl/providerstates/provider_states_test.go @@ -1134,40 +1134,39 @@ func generatePublishDealsReturn(t *testing.T) (abi.DealID, []byte) { } type nodeParams struct { - MinerAddr address.Address - MinerWorkerError error - ReserveFundsError error - Height abi.ChainEpoch - TipSetToken shared.TipSetToken - ClientMarketBalance abi.TokenAmount - ClientMarketBalanceError error - AddFundsCid cid.Cid - VerifySignatureFails bool - MostRecentStateIDError error - PieceLength uint64 - PieceSectorID uint64 - PublishDealsError error - PublishDealID abi.DealID - WaitForPublishDealsError error - OnDealCompleteError error - LocatePieceForDealWithinSectorError error - PreCommittedSectorNumber abi.SectorNumber - PreCommittedIsActive bool - DealPreCommittedSyncError error - DealPreCommittedAsyncError error - DealCommittedSyncError error - DealCommittedAsyncError error - WaitForMessageBlocks bool - WaitForMessagePublishCid cid.Cid - WaitForMessageError error - WaitForMessageExitCode exitcode.ExitCode - WaitForMessageRetBytes []byte - WaitForDealCompletionError error - OnDealExpiredError error - OnDealSlashedError error - OnDealSlashedEpoch abi.ChainEpoch - DataCap *verifreg.DataCap - GetDataCapError error + MinerAddr address.Address + MinerWorkerError error + ReserveFundsError error + Height abi.ChainEpoch + TipSetToken shared.TipSetToken + ClientMarketBalance abi.TokenAmount + ClientMarketBalanceError error + AddFundsCid cid.Cid + VerifySignatureFails bool + MostRecentStateIDError error + PieceLength uint64 + PieceSectorID uint64 + PublishDealsError error + PublishDealID abi.DealID + WaitForPublishDealsError error + OnDealCompleteError error + PreCommittedSectorNumber abi.SectorNumber + PreCommittedIsActive bool + DealPreCommittedSyncError error + DealPreCommittedAsyncError error + DealCommittedSyncError error + DealCommittedAsyncError error + WaitForMessageBlocks bool + WaitForMessagePublishCid cid.Cid + WaitForMessageError error + WaitForMessageExitCode exitcode.ExitCode + WaitForMessageRetBytes []byte + WaitForDealCompletionError error + OnDealExpiredError error + OnDealSlashedError error + OnDealSlashedEpoch abi.ChainEpoch + DataCap *verifreg.DataCap + GetDataCapError error } type dealParams struct { @@ -1269,18 +1268,17 @@ func makeExecutor(ctx context.Context, } node := &testnodes.FakeProviderNode{ - FakeCommonNode: common, - MinerAddr: nodeParams.MinerAddr, - MinerWorkerError: nodeParams.MinerWorkerError, - PieceLength: nodeParams.PieceLength, - PieceSectorID: nodeParams.PieceSectorID, - PublishDealsError: nodeParams.PublishDealsError, - PublishDealID: nodeParams.PublishDealID, - WaitForPublishDealsError: nodeParams.WaitForPublishDealsError, - OnDealCompleteError: nodeParams.OnDealCompleteError, - LocatePieceForDealWithinSectorError: nodeParams.LocatePieceForDealWithinSectorError, - DataCap: nodeParams.DataCap, - GetDataCapErr: nodeParams.GetDataCapError, + FakeCommonNode: common, + MinerAddr: nodeParams.MinerAddr, + MinerWorkerError: nodeParams.MinerWorkerError, + PieceLength: nodeParams.PieceLength, + PieceSectorID: nodeParams.PieceSectorID, + PublishDealsError: nodeParams.PublishDealsError, + PublishDealID: nodeParams.PublishDealID, + WaitForPublishDealsError: nodeParams.WaitForPublishDealsError, + OnDealCompleteError: nodeParams.OnDealCompleteError, + DataCap: nodeParams.DataCap, + GetDataCapErr: nodeParams.GetDataCapError, } if nodeParams.MinerAddr == address.Undef { diff --git a/storagemarket/nodes.go b/storagemarket/nodes.go index 94cc8ed0..c2266527 100644 --- a/storagemarket/nodes.go +++ b/storagemarket/nodes.go @@ -100,9 +100,6 @@ type StorageProviderNode interface { // GetMinerWorkerAddress returns the worker address associated with a miner GetMinerWorkerAddress(ctx context.Context, addr address.Address, tok shared.TipSetToken) (address.Address, error) - // LocatePieceForDealWithinSector looks up a given dealID in the miners sectors, and returns its sectorID and location - LocatePieceForDealWithinSector(ctx context.Context, dealID abi.DealID, tok shared.TipSetToken) (sectorID abi.SectorNumber, offset abi.PaddedPieceSize, length abi.PaddedPieceSize, err error) - // GetDataCap gets the current data cap for addr GetDataCap(ctx context.Context, addr address.Address, tok shared.TipSetToken) (*verifreg.DataCap, error) diff --git a/storagemarket/testnodes/testnodes.go b/storagemarket/testnodes/testnodes.go index d5d1b1fe..b80eddb5 100644 --- a/storagemarket/testnodes/testnodes.go +++ b/storagemarket/testnodes/testnodes.go @@ -389,14 +389,6 @@ func (n *FakeProviderNode) GetMinerWorkerAddress(ctx context.Context, miner addr return address.Undef, n.MinerWorkerError } -// LocatePieceForDealWithinSector returns stubbed data for a pieces location in a sector -func (n *FakeProviderNode) LocatePieceForDealWithinSector(ctx context.Context, dealID abi.DealID, tok shared.TipSetToken) (sectorID abi.SectorNumber, offset abi.PaddedPieceSize, length abi.PaddedPieceSize, err error) { - if n.LocatePieceForDealWithinSectorError == nil { - return abi.SectorNumber(n.PieceSectorID), 0, abi.PaddedPieceSize(n.PieceLength), nil - } - return 0, 0, 0, n.LocatePieceForDealWithinSectorError -} - // GetDataCap gets the current data cap for addr func (n *FakeProviderNode) GetDataCap(ctx context.Context, addr address.Address, tok shared.TipSetToken) (*verifreg.DataCap, error) { return n.DataCap, n.GetDataCapErr