Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions polkadot/node/network/gossip-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" }

assert_matches = "1.4.0"
async-trait = "0.1.74"
parking_lot = "0.12.1"
lazy_static = "1.4.0"
quickcheck = "1.0.3"
8 changes: 6 additions & 2 deletions polkadot/node/network/gossip-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ use metrics::Metrics;
const LOG_TARGET: &str = "parachain::gossip-support";
// How much time should we wait to reissue a connection request
// since the last authority discovery resolution failure.
#[cfg(not(test))]
const BACKOFF_DURATION: Duration = Duration::from_secs(5);

#[cfg(test)]
const BACKOFF_DURATION: Duration = Duration::from_millis(500);

/// Duration after which we consider low connectivity a problem.
///
/// Especially at startup low connectivity is expected (authority discovery cache needs to be
Expand Down Expand Up @@ -271,8 +275,8 @@ where
)
.await?;
}
// authority_discovery is just a cache so let's try every leaf to detect if there
// are new authorities there.
// authority_discovery is just a cache so let's try every time we try to re-connect
// if new authorities are present.
self.update_authority_ids(sender, session_info.discovery_keys).await;
}
}
Expand Down
Loading