Skip to content
Snippets Groups Projects
Commit bb91e994 authored by Luca Moser's avatar Luca Moser
Browse files

fixes FPC tests

parent 1dc6dbbb
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,8 @@ func TestFPCFinalizedEvent(t *testing.T) {
id := "a"
paras := fpc.DefaultParameters()
paras.FinalizationThreshold = 2
paras.CoolingOffPeriod = 2
paras.QuerySampleSize = 1
voter := fpc.New(opinionGiverFunc, paras)
var finalizedOpinion *vote.Opinion
......@@ -159,7 +161,10 @@ func TestFPCVotingMultipleOpinionGivers(t *testing.T) {
return opinionGivers, nil
}
voter := fpc.New(opinionGiverFunc)
paras := fpc.DefaultParameters()
paras.FinalizationThreshold = 2
paras.CoolingOffPeriod = 2
voter := fpc.New(opinionGiverFunc, paras)
var finalOpinion *vote.Opinion
voter.Events().Finalized.Attach(events.NewClosure(func(id string, finalizedOpinion vote.Opinion) {
finalOpinion = &finalizedOpinion
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment