parent
baee4a1576
commit
d50a26f4ae
@ -95,11 +95,12 @@ func TestDealsRetryLackOfFunds(t *testing.T) {
|
||||
dp.FastRetrieval = true
|
||||
dp.EpochPrice = abi.NewTokenAmount(62500000) // minimum asking price.
|
||||
deal := dh.StartDeal(ctx, dp)
|
||||
dh.WaitUntilDataTransfer(ctx, deal)
|
||||
|
||||
propcid := *deal
|
||||
|
||||
go func() {
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
kit.SendFunds(ctx, t, minerFullNode, publishStorageDealKey.Address, types.FromFil(1))
|
||||
|
||||
err := miner.MarketRetryPublishDeal(ctx, propcid)
|
||||
|
@ -134,29 +134,6 @@ func (dh *DealHarness) StartDeal(ctx context.Context, dealParams api.StartDealPa
|
||||
return dealProposalCid
|
||||
}
|
||||
|
||||
func (dh *DealHarness) WaitUntilDataTransfer(ctx context.Context, deal *cid.Cid) {
|
||||
loop:
|
||||
for {
|
||||
di, err := dh.client.ClientGetDealInfo(ctx, *deal)
|
||||
if err != nil {
|
||||
dh.t.Fatal("can't fetch deal info")
|
||||
}
|
||||
|
||||
switch di.State {
|
||||
case storagemarket.StorageDealProposalRejected:
|
||||
dh.t.Fatal("deal rejected")
|
||||
case storagemarket.StorageDealFailing:
|
||||
dh.t.Fatal("deal failed")
|
||||
case storagemarket.StorageDealError:
|
||||
dh.t.Fatal("deal errored")
|
||||
case storagemarket.StorageDealStartDataTransfer:
|
||||
break loop
|
||||
}
|
||||
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
}
|
||||
}
|
||||
|
||||
// WaitDealSealed waits until the deal is sealed.
|
||||
func (dh *DealHarness) WaitDealSealed(ctx context.Context, deal *cid.Cid, noseal, noSealStart bool, cb func()) {
|
||||
loop:
|
||||
|
Loading…
Reference in New Issue
Block a user