// in some tests I assume there are more than 2f faulty processes just to see how the algorithm catches multiple faulty behaviours
// I know this is not possible for the accountability specification
in some tests I assume there are more than 2f faulty processes just to see how the algorithm catches multiple faulty behaviours
I know this is not possible for the accountability specification
// in some tests I assume there are more than 2f faulty processes just to see how the algorithm catches multiple faulty behaviours // I know this is not possible for the accountability specification
func TestBasicScenarioSync(t *testing.T) {
	acc := NewAccountability()
	acc.Init(4, false)
	acc.StoreHvs("1", utils.GetHvsForDefaultConfig1WithNoJustifications())
	acc.StoreHvs("2", utils.GetHvsForDefaultConfig2WithNoJustifications())
	acc.StoreHvs("3", utils.GetHvsForDefaultConfig3WithNoJustifications())
	acc.StoreHvs("4", utils.GetHvsForDefaultConfig4WithNoJustifications())
	acc.Run(3, 4)
	expectedFaultySet := NewFaultySet()
	expectedFaultySet.AddFaultiness("3", 3, faultinessMultiplePrevotes)
	expectedFaultySet.AddFaultiness("3", 4, faultinessMissingQuorumForPrevote)
	expectedFaultySet.AddFaultiness("4", 3, faultinessMultiplePrevotes)
	expectedFaultySet.AddFaultiness("4", 4, faultinessMissingQuorumForPrevote)
	if !acc.faultySet.Equal(expectedFaultySet) {
		t.Fatal("Monitor failed to detect faulty processes")
	}
}
func TestBasicScenarioSync ( t * testing . T ) { acc := NewAccountability ( ) acc . Init ( 4 , false ) acc . StoreHvs ( " " , utils . GetHvsForDefaultConfig1WithNoJustifications ( ) ) acc . StoreHvs ( " " , utils . GetHvsForDefaultConfig2WithNoJustifications ( ) ) acc . StoreHvs ( " " , utils . GetHvsForDefaultConfig3WithNoJustifications ( ) ) acc . StoreHvs ( " " , utils . GetHvsForDefaultConfig4WithNoJustifications ( ) ) acc . Run ( 3 , 4 ) expectedFaultySet := NewFaultySet ( ) expectedFaultySet . AddFaultiness ( " " , 3 , faultinessMultiplePrevotes ) expectedFaultySet . AddFaultiness ( " " , 4 , faultinessMissingQuorumForPrevote ) expectedFaultySet . AddFaultiness ( " " , 3 , faultinessMultiplePrevotes ) expectedFaultySet . AddFaultiness ( " " , 4 , faultinessMissingQuorumForPrevote ) if ! acc . faultySet . Equal ( expectedFaultySet ) { t . Fatal ( " " ) } }
in some tests I assume there are more than 2f faulty processes just to see how the algorithm catches multiple faulty behaviours
I know this is not possible for the accountability specification
in some tests I assume there are more than 2f faulty processes just to see how the algorithm catches multiple faulty behaviours I know this is not possible for the accountability specification
// create accountability struct