UnprocessedPacketBatches pop_max fn are only used in tests (#27645)

This commit is contained in:
apfitzge 2022-09-08 11:01:14 -05:00 committed by GitHub
parent 518e16744d
commit a9c5adbf88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -269,7 +269,8 @@ impl UnprocessedPacketBatches {
}
}
pub fn pop_max(&mut self) -> Option<DeserializedPacket> {
#[cfg(test)]
fn pop_max(&mut self) -> Option<DeserializedPacket> {
self.packet_priority_queue
.pop_max()
.map(|immutable_packet| {
@ -281,7 +282,8 @@ impl UnprocessedPacketBatches {
/// Pop up to the next `n` highest priority transactions from the queue.
/// Returns `None` if the queue is empty
pub fn pop_max_n(&mut self, n: usize) -> Option<Vec<DeserializedPacket>> {
#[cfg(test)]
fn pop_max_n(&mut self, n: usize) -> Option<Vec<DeserializedPacket>> {
let current_len = self.len();
if self.is_empty() {
None