set small cb delivery delay for paych itests

This commit is contained in:
Alfonso de la Rocha 2022-12-13 13:03:42 +01:00
parent 939e515d23
commit d574d04075
No known key found for this signature in database
GPG Key ID: B7BEF4B895F2B535
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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))
}