Skip to content

Commit

Permalink
make sure hosts and renter use same network
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Dec 18, 2024
1 parent b495a18 commit ff28d3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion internal/test/e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,15 @@ func newTestCluster(t *testing.T, opts testClusterOptions) *TestCluster {
})))

cm := opts.cm
network, genesis := testNetwork()
if cm == nil {
// create chain manager
network, genesis := testNetwork()
store, state, err := chain.NewDBStore(chain.NewMemDB(), network, genesis)
tt.OK(err)
cm = chain.NewManager(store, state)
}
network := cm.TipState().Network
genesis := types.Block{Timestamp: network.HardforkOak.GenesisTimestamp}

// Create bus.
busDir := filepath.Join(dir, "bus")
Expand Down
2 changes: 1 addition & 1 deletion internal/test/e2e/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2949,7 +2949,7 @@ func TestV1ToV2Transition(t *testing.T) {
cluster.AddHosts(nHosts)

// make sure we are still before the v2 allow height
if cm.Tip().Height >= network.HardforkV2.AllowHeight {
if cluster.IsPassedV2AllowHeight() {
t.Fatal("should be before the v2 allow height")
}

Expand Down

0 comments on commit ff28d3d

Please sign in to comment.