From 4b5cea104c2c28204918ba2c9b52ca4d191fc497 Mon Sep 17 00:00:00 2001 From: Jude Nelson Date: Mon, 15 Nov 2021 23:50:12 -0500 Subject: [PATCH] fix: add back in network_epoch --- src/chainstate/stacks/miner.rs | 6 ++++++ src/net/relay.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/chainstate/stacks/miner.rs b/src/chainstate/stacks/miner.rs index 686bcb5d2..6c72a5363 100644 --- a/src/chainstate/stacks/miner.rs +++ b/src/chainstate/stacks/miner.rs @@ -7034,12 +7034,14 @@ pub mod test { start_height: 0, end_height: 0, block_limit: ExecutionCost::max_value(), + network_epoch: PEER_VERSION_EPOCH_1_0, }, StacksEpoch { epoch_id: StacksEpochId::Epoch20, start_height: 0, end_height: 30, // NOTE: the first 25 burnchain blocks have no sortition block_limit: ExecutionCost::max_value(), + network_epoch: PEER_VERSION_EPOCH_2_0, }, StacksEpoch { epoch_id: StacksEpochId::Epoch2_05, @@ -7052,6 +7054,7 @@ pub mod test { read_count: 205205, runtime: 205205, }, + network_epoch: PEER_VERSION_EPOCH_2_05, }, ]; peer_config.epochs = Some(epochs); @@ -7272,12 +7275,14 @@ pub mod test { start_height: 0, end_height: 0, block_limit: ExecutionCost::max_value(), + network_epoch: PEER_VERSION_EPOCH_1_0, }, StacksEpoch { epoch_id: StacksEpochId::Epoch20, start_height: 0, end_height: 30, // NOTE: the first 25 burnchain blocks have no sortition block_limit: ExecutionCost::max_value(), + network_epoch: PEER_VERSION_EPOCH_2_0, }, StacksEpoch { epoch_id: StacksEpochId::Epoch2_05, @@ -7290,6 +7295,7 @@ pub mod test { read_count: 205205, runtime: 205205, }, + network_epoch: PEER_VERSION_EPOCH_2_05, }, ]; peer_config.epochs = Some(epochs); diff --git a/src/net/relay.rs b/src/net/relay.rs index b71188735..963ed5c05 100644 --- a/src/net/relay.rs +++ b/src/net/relay.rs @@ -1352,7 +1352,7 @@ impl PeerNetwork { let inbound_recipients = if inbound_recipients_unshuffled.len() > MAX_BROADCAST_INBOUND_RECEIVERS { - &mut inbound_recipients_unshuffled[..].shuffle(&mut thread_rng()); + let _ = &mut inbound_recipients_unshuffled[..].shuffle(&mut thread_rng()); inbound_recipients_unshuffled[0..MAX_BROADCAST_INBOUND_RECEIVERS].to_vec() } else { inbound_recipients_unshuffled