fix paych test; re-add pubsub bootstrapping.

This commit is contained in:
Raúl Kripalani 2021-05-21 19:46:58 +01:00
parent 63f929541f
commit 416340d227
4 changed files with 14 additions and 2 deletions

View File

@ -1,6 +1,9 @@
package itests
import (
"fmt"
"os"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/chain/actors/policy"
logging "github.com/ipfs/go-log/v2"
@ -12,4 +15,9 @@ func init() {
policy.SetConsensusMinerMinPower(abi.NewStoragePower(2048))
policy.SetSupportedProofTypes(abi.RegisteredSealProof_StackedDrg2KiBV1)
policy.SetMinVerifiedDealSize(abi.NewStoragePower(256))
err := os.Setenv("BELLMAN_NO_GPU", "1")
if err != nil {
panic(fmt.Sprintf("failed to set BELLMAN_NO_GPU env variable: %s", err))
}
}

View File

@ -252,7 +252,7 @@ type DealsScaffold struct {
BlockMiner *BlockMiner
}
func ConnectAndStartMining(t *testing.T, blocktime time.Duration, miner TestMiner, clients ...*impl.FullNodeAPI) *BlockMiner {
func ConnectAndStartMining(t *testing.T, blocktime time.Duration, miner TestMiner, clients ...api.FullNode) *BlockMiner {
ctx := context.Background()
for _, c := range clients {

View File

@ -12,6 +12,7 @@ import (
"testing"
"time"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/gorilla/mux"
"golang.org/x/xerrors"
@ -475,6 +476,9 @@ func mockMinerBuilderOpts(t *testing.T, fullOpts []FullNodeOpts, storage []Stora
node.Override(new(ffiwrapper.Verifier), mock.MockVerifier),
// so that we subscribe to pubsub topics immediately
node.Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(true)),
genesis,
fullOpts[i].Opts(fulls),

View File

@ -277,7 +277,7 @@ func waitForBlocks(ctx context.Context, t *testing.T, bm *kit.BlockMiner, paymen
size = count - i
}
// Add a batch of null blocks
// Add a batch of null blocks to advance the chain quicker through finalities.
bm.InjectNulls(abi.ChainEpoch(size - 1))
// Add a real block