diff --git a/build/params_mainnet.go b/build/params_mainnet.go index 93cdb66bd..1612f4ab9 100644 --- a/build/params_mainnet.go +++ b/build/params_mainnet.go @@ -130,4 +130,4 @@ var WhitelistedBlock = MustParseCid("bafy2bzaceapyg2uyzk7vueh3xccxkuwbz3nxewjygu // CBDeliveryDelay is the delay before deliver in the synchronous consistent broadcast. // This determines the wait time for the detection of potential equivocations. -const CBDeliveryDelay = 6 * time.Second +var CBDeliveryDelay = 6 * time.Second diff --git a/itests/kit/init.go b/itests/kit/init.go index 9397c53a2..c6545edda 100644 --- a/itests/kit/init.go +++ b/itests/kit/init.go @@ -3,6 +3,7 @@ package kit import ( "fmt" "os" + "time" logging "github.com/ipfs/go-log/v2" @@ -40,6 +41,12 @@ func init() { build.InsecurePoStValidation = true + // NOTE: If we want the payment channel itests to pass that use a + // block time of 5*millisecond, we need to set the consistent broadcast + // delay to something lower than that block time. + // todo: configure such a low delay only for paych tests. + build.CBDeliveryDelay = 2 * time.Millisecond + if err := os.Setenv("BELLMAN_NO_GPU", "1"); err != nil { panic(fmt.Sprintf("failed to set BELLMAN_NO_GPU env variable: %s", err)) }