policy.SetPreCommitChallengeDelay to reduce WaitSeed stage time
This commit is contained in:
parent
5e10d53ca8
commit
00618672f5
@ -13,6 +13,7 @@ import (
|
||||
"github.com/filecoin-project/lotus/api"
|
||||
"github.com/filecoin-project/lotus/build"
|
||||
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
|
||||
"github.com/filecoin-project/lotus/chain/actors/policy"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
|
||||
"github.com/filecoin-project/lotus/itests/kit"
|
||||
@ -30,6 +31,12 @@ func TestDealCyclesConcurrent(t *testing.T) {
|
||||
|
||||
kit.QuietMiningLogs()
|
||||
|
||||
oldDelay := policy.GetPreCommitChallengeDelay()
|
||||
policy.SetPreCommitChallengeDelay(5)
|
||||
t.Cleanup(func() {
|
||||
policy.SetPreCommitChallengeDelay(oldDelay)
|
||||
})
|
||||
|
||||
blockTime := 10 * time.Millisecond
|
||||
|
||||
// For these tests where the block time is artificially short, just use
|
||||
@ -107,6 +114,12 @@ func TestDealsWithSealingAndRPC(t *testing.T) {
|
||||
|
||||
kit.QuietMiningLogs()
|
||||
|
||||
oldDelay := policy.GetPreCommitChallengeDelay()
|
||||
policy.SetPreCommitChallengeDelay(5)
|
||||
t.Cleanup(func() {
|
||||
policy.SetPreCommitChallengeDelay(oldDelay)
|
||||
})
|
||||
|
||||
var blockTime = 1 * time.Second
|
||||
|
||||
client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC(), kit.WithAllSubsystems()) // no mock proofs.
|
||||
@ -224,6 +237,12 @@ func TestPublishDealsBatching(t *testing.T) {
|
||||
startEpoch = abi.ChainEpoch(2 << 12)
|
||||
)
|
||||
|
||||
oldDelay := policy.GetPreCommitChallengeDelay()
|
||||
policy.SetPreCommitChallengeDelay(5)
|
||||
t.Cleanup(func() {
|
||||
policy.SetPreCommitChallengeDelay(oldDelay)
|
||||
})
|
||||
|
||||
kit.QuietMiningLogs()
|
||||
|
||||
opts := node.Override(new(*storageadapter.DealPublisher),
|
||||
@ -365,6 +384,12 @@ func TestOfflineDealFlow(t *testing.T) {
|
||||
// so that the deal starts sealing in time
|
||||
startEpoch := abi.ChainEpoch(2 << 12)
|
||||
|
||||
oldDelay := policy.GetPreCommitChallengeDelay()
|
||||
policy.SetPreCommitChallengeDelay(5)
|
||||
t.Cleanup(func() {
|
||||
policy.SetPreCommitChallengeDelay(oldDelay)
|
||||
})
|
||||
|
||||
runTest := func(t *testing.T, fastRet bool) {
|
||||
ctx := context.Background()
|
||||
client, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs())
|
||||
@ -447,6 +472,12 @@ func TestZeroPricePerByteRetrieval(t *testing.T) {
|
||||
t.Skip("skipping test in short mode")
|
||||
}
|
||||
|
||||
oldDelay := policy.GetPreCommitChallengeDelay()
|
||||
policy.SetPreCommitChallengeDelay(5)
|
||||
t.Cleanup(func() {
|
||||
policy.SetPreCommitChallengeDelay(oldDelay)
|
||||
})
|
||||
|
||||
kit.QuietMiningLogs()
|
||||
|
||||
var (
|
||||
|
Loading…
Reference in New Issue
Block a user