From 4dc66511479993c496ecbae0bc2661669925662b Mon Sep 17 00:00:00 2001 From: Arpit Temani Date: Thu, 22 Sep 2022 14:31:44 +0530 Subject: [PATCH] refactor tests --- tests/bor/bor_sprint_length_change_tests.go | 2 +- tests/bor/bor_test.go | 2 +- tests/bor/helper.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/bor/bor_sprint_length_change_tests.go b/tests/bor/bor_sprint_length_change_tests.go index c65df617ee..6a131eadce 100644 --- a/tests/bor/bor_sprint_length_change_tests.go +++ b/tests/bor/bor_sprint_length_change_tests.go @@ -38,7 +38,7 @@ func TestValidatorsBlockProduction(t *testing.T) { ) for i := 0; i < 2; i++ { // Start the node and wait until it's up - stack, ethBackend, err := InitMiner(genesis, keys[i]) + stack, ethBackend, err := InitMiner(genesis, keys[i], true) if err != nil { panic(err) } diff --git a/tests/bor/bor_test.go b/tests/bor/bor_test.go index f77a3ad104..162130b283 100644 --- a/tests/bor/bor_test.go +++ b/tests/bor/bor_test.go @@ -68,7 +68,7 @@ func TestValidatorWentOffline(t *testing.T) { ) for i := 0; i < 2; i++ { // Start the node and wait until it's up - stack, ethBackend, err := InitMiner(genesis, keys[i]) + stack, ethBackend, err := InitMiner(genesis, keys[i], true) if err != nil { panic(err) } diff --git a/tests/bor/helper.go b/tests/bor/helper.go index a60f66d153..b6fb2e9288 100644 --- a/tests/bor/helper.go +++ b/tests/bor/helper.go @@ -367,7 +367,7 @@ func IsSprintEnd(number uint64) bool { return (number+1)%sprintSize == 0 } -func InitMiner(genesis *core.Genesis, privKey *ecdsa.PrivateKey) (*node.Node, *eth.Ethereum, error) { +func InitMiner(genesis *core.Genesis, privKey *ecdsa.PrivateKey, withoutHeimdall bool) (*node.Node, *eth.Ethereum, error) { // Define the basic configurations for the Ethereum node datadir, _ := ioutil.TempDir("", "") @@ -402,7 +402,7 @@ func InitMiner(genesis *core.Genesis, privKey *ecdsa.PrivateKey) (*node.Node, *e GasPrice: big.NewInt(1), Recommit: time.Second, }, - WithoutHeimdall: true, + WithoutHeimdall: withoutHeimdall, }) if err != nil { return nil, nil, err