Skip to content

Commit

Permalink
e2e: make v2 hardfork height a build flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Jul 31, 2024
1 parent 6363ba7 commit 603e953
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
9 changes: 9 additions & 0 deletions internal/test/e2e/build_v1.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build !v2

package e2e

// configuration for pre-v2-hardfork tests
const (
HardforkV2AllowHeight = 10000
HardforkV2RequireHeight = 20000
)
9 changes: 9 additions & 0 deletions internal/test/e2e/build_v2.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build v2

package e2e

// configuration for post-v2-hardfork tests
const (
HardforkV2AllowHeight = 2
HardforkV2RequireHeight = 3
)
4 changes: 2 additions & 2 deletions internal/test/e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ func testNetwork() (*consensus.Network, types.Block) {
n.HardforkOak.Height = 1
n.HardforkASIC.Height = 1
n.HardforkFoundation.Height = 1
n.HardforkV2.AllowHeight = 1000
n.HardforkV2.RequireHeight = 1020
n.HardforkV2.AllowHeight = HardforkV2AllowHeight
n.HardforkV2.RequireHeight = HardforkV2RequireHeight

// TODO: remove once we got rid of all siad dependencies
utils.ConvertToCore(stypes.GenesisBlock, (*types.V1Block)(&genesis))
Expand Down

0 comments on commit 603e953

Please sign in to comment.