Skip to content

Commit

Permalink
chore: removing buffer
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Paitrault <[email protected]>
  • Loading branch information
Freyskeyd committed Jul 3, 2023
1 parent 35a3818 commit 4fe92e3
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions crates/topos-tce-broadcast/src/double_echo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,20 +411,20 @@ impl DoubleEcho {
);
}

if self.pending_certificate_count > 0 {
if let Ok(Some((pending, certificate))) = self
.storage
.next_pending_certificate(Some(self.last_pending_certificate as usize))
.await
{
_ = self.pending_certificate_count.checked_sub(1);
self.last_pending_certificate = pending;
self.buffer.push_back((true, certificate));
DOUBLE_ECHO_CURRENT_BUFFER_SIZE.inc();
} else {
info!("No more certificate to broadcast");
}
}
// if self.pending_certificate_count > 0 {
// if let Ok(Some((pending, certificate))) = self
// .storage
// .next_pending_certificate(Some(self.last_pending_certificate as usize))
// .await
// {
// _ = self.pending_certificate_count.checked_sub(1);
// self.last_pending_certificate = pending;
// self.buffer.push_back((false, certificate));
// DOUBLE_ECHO_CURRENT_BUFFER_SIZE.inc();
// } else {
// info!("No more certificate to broadcast");
// }
// }
}
}
};
Expand Down

0 comments on commit 4fe92e3

Please sign in to comment.