diff --git a/src/broadcast_service.rs b/src/broadcast_service.rs index ef7e8c13c1..d6ddbc74e0 100644 --- a/src/broadcast_service.rs +++ b/src/broadcast_service.rs @@ -91,7 +91,7 @@ impl Broadcast { inc_new_counter_info!("streamer-broadcast-sent", blobs.len()); if contains_last_tick { - blobs.last().unwrap().write().unwrap().set_is_last_blob(); + blobs.last().unwrap().write().unwrap().set_is_last_in_slot(); } blocktree.write_shared_blobs(&blobs)?; diff --git a/src/packet.rs b/src/packet.rs index 80196634b9..e2693c2aeb 100644 --- a/src/packet.rs +++ b/src/packet.rs @@ -292,7 +292,7 @@ macro_rules! align { pub const BLOB_HEADER_SIZE: usize = align!(SIZE_RANGE.end, 8); -pub const BLOB_FLAG_IS_LAST: u32 = 0x2; +pub const BLOB_FLAG_IS_LAST_IN_SLOT: u32 = 0x2; pub const BLOB_FLAG_IS_CODING: u32 = 0x1; @@ -352,13 +352,13 @@ impl Blob { self.set_flags(flags | BLOB_FLAG_IS_CODING); } - pub fn set_is_last_blob(&mut self) { + pub fn set_is_last_in_slot(&mut self) { let flags = self.flags(); - self.set_flags(flags | BLOB_FLAG_IS_LAST); + self.set_flags(flags | BLOB_FLAG_IS_LAST_IN_SLOT); } - pub fn is_last_blob(&self) -> bool { - (self.flags() & BLOB_FLAG_IS_LAST) != 0 + pub fn is_last_in_slot(&self) -> bool { + (self.flags() & BLOB_FLAG_IS_LAST_IN_SLOT) != 0 } pub fn data_size(&self) -> u64 { diff --git a/tests/multinode.rs b/tests/multinode.rs index c3b56ac39d..a37cdb2dfe 100644 --- a/tests/multinode.rs +++ b/tests/multinode.rs @@ -1657,14 +1657,14 @@ fn test_broadcast_last_tick() { for b in blobs { let b_r = b.read().unwrap(); if b_r.index() == last_tick_entry_index as u64 { - assert!(b_r.is_last_blob()); + assert!(b_r.is_last_in_slot()); debug!("last_tick_blob: {:?}", b_r); let actual_last_tick = &reconstruct_entries_from_blobs(vec![&*b_r]) .expect("Expected to be able to reconstruct entries from blob") .0[0]; assert_eq!(actual_last_tick, expected_last_tick); } else { - assert!(!b_r.is_last_blob()); + assert!(!b_r.is_last_in_slot()); } } }