message: Port to fix run_equivocator_network.
diff: @@ -16,9 +16,14 @@ use casper_types::{
  };
  use crate::{
  - components::{chainspec_loader::NextUpgrade, consensus, gossiper, small_network, storage},
  + components::{chainspec_loader::NextUpgrade, gossiper, small_network, storage},
  crypto::AsymmetricKeyExt,
  - effect::{requests::ContractRuntimeRequest, EffectExt},
  + effect::{
  + announcements::NetworkAnnouncement,
  + requests::{ContractRuntimeRequest, NetworkRequest},
  + EffectExt,
  + },
  + protocol::Message,
  reactor::{
  initializer, joiner,
  participating::{self, ParticipatingEvent},
  @@ -334,18 +339,19 @@ async fn run_equivocator_network() {
  .unwrap()
  .set_filter(move |event| {
  let now = Timestamp::now();
  - let first_message_time = match (&event, maybe_first_message_time) {
  - (
  - ParticipatingEvent::NetworkRequest(_)
  - | ParticipatingEvent::Consensus(consensus::Event::MessageReceived { .. }),
  - Some(first_message_time),
  - ) => first_message_time,
  - (ParticipatingEvent::Consensus(consensus::Event::MessageReceived { .. }), None) => {
  - maybe_first_message_time = Some(now);
  - now
  - }
  + match &event {
  + ParticipatingEvent::NetworkAnnouncement(NetworkAnnouncement::MessageReceived {
  + payload,
  + ..
  + }) if matches!(*payload, Message::Consensus(_)) => {}
  + ParticipatingEvent::NetworkRequest(
  + NetworkRequest::SendMessage { payload, .. }
  + | NetworkRequest::Broadcast { payload, .. }
  + | NetworkRequest::Gossip { payload, .. },
  + ) if matches!(**payload, Message::Consensus(_)) => {}
  _ => return Either::Right(event),
  };
  + let first_message_time = *maybe_first_message_time.get_or_insert(now);
  if now < first_message_time + min_round_len * 3 {
  return Either::Left(time::sleep(min_round_len.into()).event(move |_| event));
  }
  