Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AdoAdoAdo committed Jan 28, 2025
1 parent 2d594a5 commit 943c287
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion consensus/spos/bls/v2/subroundEndRound_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,11 @@ func TestSubroundEndRound_DoEndRoundJobAllOK(t *testing.T) {
t.Parallel()

container := consensusMocks.InitConsensusCore()
container.SetEquivalentProofsPool(&dataRetriever.ProofsPoolMock{
HasProofCalled: func(shardID uint32, headerHash []byte) bool {
return true
},
})
sr := initSubroundEndRoundWithContainer(container, &statusHandler.AppStatusHandlerStub{})
sr.SetSelfPubKey("A")

Expand Down Expand Up @@ -1176,6 +1181,11 @@ func TestSubroundEndRound_DoEndRoundJobByNode(t *testing.T) {
t.Parallel()

container := consensusMocks.InitConsensusCore()
container.SetEquivalentProofsPool(&dataRetriever.ProofsPoolMock{
HasProofCalled: func(shardID uint32, headerHash []byte) bool {
return true
},
})
sr := initSubroundEndRoundWithContainer(container, &statusHandler.AppStatusHandlerStub{})

verifySigShareNumCalls := 0
Expand Down Expand Up @@ -1233,13 +1243,17 @@ func TestSubroundEndRound_DoEndRoundJobByNode(t *testing.T) {
return &block.HeaderV2{}
},
})
container.SetEquivalentProofsPool(&dataRetriever.ProofsPoolMock{
HasProofCalled: func(shardID uint32, headerHash []byte) bool {
return true
},
})
enableEpochsHandler := &enableEpochsHandlerMock.EnableEpochsHandlerStub{
IsFlagEnabledInEpochCalled: func(flag core.EnableEpochFlag, epoch uint32) bool {
return flag == common.EquivalentMessagesFlag
},
}
container.SetEnableEpochsHandler(enableEpochsHandler)
container.SetEquivalentProofsPool(&dataRetriever.ProofsPoolMock{})

ch := make(chan bool, 1)
consensusState := initializers.InitConsensusState()
Expand Down

0 comments on commit 943c287

Please sign in to comment.