diff --git a/crypto/bls/bls_test.go b/crypto/bls/bls_test.go index e0a7bd2db..2e357e010 100644 --- a/crypto/bls/bls_test.go +++ b/crypto/bls/bls_test.go @@ -232,10 +232,16 @@ func TestSetMask(test *testing.T) { mask, _ := NewMask([]*bls.PublicKey{pubKey1, pubKey2}, pubKey1) _ = mask - left := []byte{3} - mask.SetMask(left) + maskBytes := []byte{3} + mask.SetMask(maskBytes) if mask.CountEnabled() != 2 { test.Error("Count of Enabled nodes doesn't match") } + + newMaskBytes := []byte{3, 2} + + if err := mask.SetMask(newMaskBytes); err == nil { + test.Error("Expected mismatching Bitmap lengths") + } }