From 103d786c720afe125b1063c552cd5533d1c39919 Mon Sep 17 00:00:00 2001 From: Alfonso de la Rocha Date: Wed, 29 Mar 2023 17:43:10 +0200 Subject: [PATCH] return CBDeliveryDelay into a var --- build/params_2k.go | 2 +- build/params_butterfly.go | 3 ++- build/params_calibnet.go | 3 ++- build/params_interop.go | 3 ++- build/params_mainnet.go | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/build/params_2k.go b/build/params_2k.go index fb8b1beea..8220ce8aa 100644 --- a/build/params_2k.go +++ b/build/params_2k.go @@ -143,4 +143,4 @@ var WhitelistedBlock = cid.Undef // Reducing the delivery delay for equivocation of // consistent broadcast to just half a second. -const CBDeliveryDelay = 500 * time.Milisecond +var CBDeliveryDelay = 500 * time.Milisecond diff --git a/build/params_butterfly.go b/build/params_butterfly.go index 137ab7dee..4fdac1ec8 100644 --- a/build/params_butterfly.go +++ b/build/params_butterfly.go @@ -92,4 +92,5 @@ var WhitelistedBlock = cid.Undef // CBDeliveryDelay is the delay before deliver in the synchronous consistent broadcast. // This determines the wait time for the detection of potential equivocations. -const CBDeliveryDelay = 2 * time.Second +// It is a variable instead of a constant so it can be conveniently configured in tests +var CBDeliveryDelay = 2 * time.Second diff --git a/build/params_calibnet.go b/build/params_calibnet.go index 7bfca2a42..35ae1796c 100644 --- a/build/params_calibnet.go +++ b/build/params_calibnet.go @@ -126,4 +126,5 @@ var WhitelistedBlock = cid.Undef // CBDeliveryDelay is the delay before deliver in the synchronous consistent broadcast. // This determines the wait time for the detection of potential equivocations. -const CBDeliveryDelay = 2 * time.Second +// It is a variable instead of a constant so it can be conveniently configured in tests +var CBDeliveryDelay = 2 * time.Second diff --git a/build/params_interop.go b/build/params_interop.go index 0fb865248..72cfdca35 100644 --- a/build/params_interop.go +++ b/build/params_interop.go @@ -132,4 +132,5 @@ var WhitelistedBlock = cid.Undef // CBDeliveryDelay is the delay before deliver in the synchronous consistent broadcast. // This determines the wait time for the detection of potential equivocations. -const CBDeliveryDelay = 2 * time.Second +// It is a variable instead of a constant so it can be conveniently configured in tests +var CBDeliveryDelay = 2 * time.Second diff --git a/build/params_mainnet.go b/build/params_mainnet.go index bb205a827..d4cf6ff4b 100644 --- a/build/params_mainnet.go +++ b/build/params_mainnet.go @@ -141,4 +141,5 @@ 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 = 2 * time.Second +// It is a variable instead of a constant so it can be conveniently configured in tests +var CBDeliveryDelay = 2 * time.Second