Broadcast blobs even if the peers have no stake (#4597)
This commit is contained in:
@ -127,23 +127,19 @@ impl Broadcast {
|
|||||||
let bank_epoch = bank.get_stakers_epoch(bank.slot());
|
let bank_epoch = bank.get_stakers_epoch(bank.slot());
|
||||||
let stakes = staking_utils::staked_nodes_at_epoch(&bank, bank_epoch);
|
let stakes = staking_utils::staked_nodes_at_epoch(&bank, bank_epoch);
|
||||||
|
|
||||||
if let Some(nodes) = stakes.as_ref() {
|
// Send out data
|
||||||
if nodes.len() > 1 {
|
cluster_info
|
||||||
// Send out data
|
.read()
|
||||||
cluster_info
|
.unwrap()
|
||||||
.read()
|
.broadcast(sock, &blobs, stakes.as_ref())?;
|
||||||
.unwrap()
|
|
||||||
.broadcast(sock, &blobs, stakes.as_ref())?;
|
|
||||||
|
|
||||||
inc_new_counter_debug!("streamer-broadcast-sent", blobs.len());
|
inc_new_counter_debug!("streamer-broadcast-sent", blobs.len());
|
||||||
|
|
||||||
// send out erasures
|
// send out erasures
|
||||||
cluster_info
|
cluster_info
|
||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.broadcast(sock, &coding, stakes.as_ref())?;
|
.broadcast(sock, &coding, stakes.as_ref())?;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self.update_broadcast_stats(
|
self.update_broadcast_stats(
|
||||||
duration_as_ms(&broadcast_start.elapsed()),
|
duration_as_ms(&broadcast_start.elapsed()),
|
||||||
|
Reference in New Issue
Block a user