mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-06-19 17:21:00 +08:00
fix: add back in network_epoch
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user