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

View File

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