mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Ensure attestations are created with empty signature (#960)
* Ensure attestations are created with empty sig * Update docs
This commit is contained in:
@@ -32,9 +32,12 @@ impl AggregateSignature {
|
||||
|
||||
/// Add (aggregate) a signature to the `AggregateSignature`.
|
||||
pub fn add(&mut self, signature: &Signature) {
|
||||
if !self.is_empty {
|
||||
self.aggregate_signature.add(signature.as_raw())
|
||||
if self.is_empty {
|
||||
self.aggregate_signature = RawAggregateSignature::new();
|
||||
self.is_empty = false;
|
||||
}
|
||||
|
||||
self.aggregate_signature.add(signature.as_raw())
|
||||
}
|
||||
|
||||
/// Add (aggregate) another `AggregateSignature`.
|
||||
|
||||
Reference in New Issue
Block a user