From 893302e3f5da61e8fbb71fc7434d951c811973b6 Mon Sep 17 00:00:00 2001 From: Adrian Dobrita Date: Mon, 16 Dec 2024 18:04:45 +0200 Subject: [PATCH] fixes after review --- consensus/spos/bls/v1/subroundBlock.go | 4 ++-- integrationTests/consensus/consensusSigning_test.go | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/consensus/spos/bls/v1/subroundBlock.go b/consensus/spos/bls/v1/subroundBlock.go index 31485aec72..504cb82a18 100644 --- a/consensus/spos/bls/v1/subroundBlock.go +++ b/consensus/spos/bls/v1/subroundBlock.go @@ -547,9 +547,9 @@ func (sr *subroundBlock) receivedBlockHeader(ctx context.Context, cnsDta *consen func headerHasProof(headerHandler data.HeaderHandler) bool { if check.IfNil(headerHandler) { - return true + return false } - return headerHandler.GetPreviousProof() != nil + return !check.IfNilReflect(headerHandler.GetPreviousProof()) } func (sr *subroundBlock) processReceivedBlock(ctx context.Context, cnsDta *consensus.Message) bool { diff --git a/integrationTests/consensus/consensusSigning_test.go b/integrationTests/consensus/consensusSigning_test.go index c2d6f6ded6..dfa6966f1f 100644 --- a/integrationTests/consensus/consensusSigning_test.go +++ b/integrationTests/consensus/consensusSigning_test.go @@ -8,7 +8,6 @@ import ( "testing" "time" - logger "github.com/multiversx/mx-chain-logger-go" "github.com/stretchr/testify/assert" "github.com/multiversx/mx-chain-go/integrationTests" @@ -71,8 +70,6 @@ func TestConsensusWithInvalidSigners(t *testing.T) { t.Skip("this is not a short test") } - _ = logger.SetLogLevel("*:DEBUG") - numMetaNodes := uint32(4) numNodes := uint32(4) consensusSize := uint32(4) @@ -107,7 +104,7 @@ func TestConsensusWithInvalidSigners(t *testing.T) { go checkBlockProposedEveryRound(numCommBlock, nonceForRoundMap, mutex, chDone, t) extraTime := uint64(2) - endTime := time.Duration(roundTime)*time.Duration(numCommBlock+extraTime)*time.Millisecond + 10*time.Minute + endTime := time.Duration(roundTime)*time.Duration(numCommBlock+extraTime)*time.Millisecond + time.Minute select { case <-chDone: case <-time.After(endTime):