itests: Add test for synth-porep pledge

This commit is contained in:
Łukasz Magiera 2023-07-12 16:02:59 +02:00
parent 2f19a5f66d
commit f8c151094f

View File

@ -19,6 +19,7 @@ import (
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/itests/kit"
"github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/impl"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
)
@ -242,3 +243,30 @@ func TestPledgeBeforeNv13(t *testing.T) {
runTest(t, 100)
})
}
func TestPledgeSynth(t *testing.T) {
kit.QuietMiningLogs()
blockTime := 50 * time.Millisecond
runTest := func(t *testing.T, nSectors int) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
_, miner, ens := kit.EnsembleMinimal(t, kit.MutateSealingConfig(func(sc *config.SealingConfig) {
sc.UseSyntheticPoRep = true
})) // no mock proofs
ens.InterconnectAll().BeginMining(blockTime)
miner.PledgeSectors(ctx, nSectors, 0, nil)
}
t.Run("1", func(t *testing.T) {
runTest(t, 1)
})
t.Run("3", func(t *testing.T) {
runTest(t, 100)
})
}