From 7f247bf553308a4b5f7f248885d79c92bd9c0b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Sun, 30 May 2021 19:26:53 +0200 Subject: [PATCH] Self-review cleanup --- api/test/deals.go | 15 ++++++++++++--- markets/storageadapter/ondealsectorcommitted.go | 2 -- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/api/test/deals.go b/api/test/deals.go index 740fb8fea..aa7e23bcc 100644 --- a/api/test/deals.go +++ b/api/test/deals.go @@ -19,6 +19,7 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors/builtin/market" @@ -227,6 +228,9 @@ func TestBatchDealInput(t *testing.T, b APIBuilder, blocktime time.Duration, sta s := connectAndStartMining(t, b, blocktime, client, miner) defer s.blockMiner.Stop() + err := miner.MarketSetAsk(s.ctx, big.Zero(), big.Zero(), 200, 128, 32<<30) + require.NoError(t, err) + checkNoPadding := func() { sl, err := sn[0].SectorsList(s.ctx) require.NoError(t, err) @@ -239,7 +243,7 @@ func TestBatchDealInput(t *testing.T, b APIBuilder, blocktime time.Duration, sta si, err := sn[0].SectorsStatus(s.ctx, snum, false) require.NoError(t, err) - fmt.Printf("S %d: %+v %s\n", snum, si.Deals, si.State) + // fmt.Printf("S %d: %+v %s\n", snum, si.Deals, si.State) for _, deal := range si.Deals { if deal == 0 { @@ -278,13 +282,18 @@ func TestBatchDealInput(t *testing.T, b APIBuilder, blocktime time.Duration, sta sl, err := sn[0].SectorsList(s.ctx) require.NoError(t, err) require.Equal(t, len(sl), expectSectors) - //require.LessOrEqual(t, len(sl), expectSectors+1) } } t.Run("4-p1600B", run(1600, 4, 4)) t.Run("4-p513B", run(513, 4, 2)) - t.Run("32-p257B", run(257, 32, 8)) + if !testing.Short() { + t.Run("32-p257B", run(257, 32, 8)) + t.Run("32-p10B", run(10, 32, 2)) + + // fixme: this appears to break data-transfer / markets in some really creative ways + //t.Run("128-p10B", run(10, 128, 8)) + } } func TestFastRetrievalDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch) { diff --git a/markets/storageadapter/ondealsectorcommitted.go b/markets/storageadapter/ondealsectorcommitted.go index f255c9e55..31bc0b8bf 100644 --- a/markets/storageadapter/ondealsectorcommitted.go +++ b/markets/storageadapter/ondealsectorcommitted.go @@ -104,8 +104,6 @@ func (mgr *SectorCommittedManager) OnDealSectorPreCommitted(ctx context.Context, } } - log.Infow("sub precommit", "deal", dealInfo.DealID) - // Not yet active, start matching against incoming messages return false, true, nil }