Fix 5288: Doesn't POST if attestations is empty. (#5318)

* changed to is_empty() and removed WARN

* added log argument

* fix: issue 5288
This commit is contained in:
Krishang Shah 2024-03-07 14:19:18 +05:30 committed by GitHub
parent bf118a17d4
commit b9614571a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -430,6 +430,11 @@ impl<T: SlotClock + 'static, E: EthSpec> AttestationService<T, E> {
.flatten() .flatten()
.unzip(); .unzip();
if attestations.is_empty() {
warn!(log, "No attestations were published");
return Ok(None);
}
// Post the attestations to the BN. // Post the attestations to the BN.
match self match self
.beacon_nodes .beacon_nodes