mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
fix(bls): fix is_infinity when aggregating onto empty AggregateSignature (#8496)
Co-Authored-By: figtracer <1gusredo@gmail.com> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
@@ -356,6 +356,17 @@ macro_rules! test_suite {
|
||||
.assert_single_message_verify(true)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn empty_aggregate_plus_infinity_should_be_infinity() {
|
||||
let mut agg = AggregateSignature::empty();
|
||||
let infinity_sig = Signature::deserialize(&INFINITY_SIGNATURE).unwrap();
|
||||
agg.add_assign(&infinity_sig);
|
||||
assert!(
|
||||
agg.is_infinity(),
|
||||
"is_infinity flag should be true after adding infinity to empty"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deserialize_infinity_public_key() {
|
||||
PublicKey::deserialize(&bls::INFINITY_PUBLIC_KEY).unwrap_err();
|
||||
|
||||
Reference in New Issue
Block a user