aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/simtest/mod.rs')
-rw-r--r--src/simtest/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/simtest/mod.rs b/src/simtest/mod.rs
index 76583de..808f44f 100644
--- a/src/simtest/mod.rs
+++ b/src/simtest/mod.rs
@@ -12,6 +12,7 @@
mod deltas;
mod identity;
mod links;
+mod relay;
mod remakes;
mod soak;
mod timing;
@@ -122,6 +123,18 @@ impl Sim {
seeds: &[&str],
start: Start,
) -> AppState {
+ self.start_on_with(id, schemes, seeds, start, |_| {})
+ }
+
+ /// [`start_on`](Self::start_on), with the configuration adjusted first.
+ pub(crate) fn start_on_with(
+ &self,
+ id: &str,
+ schemes: &[&'static str],
+ seeds: &[&str],
+ start: Start,
+ adjust: impl FnOnce(&mut NodeConfig),
+ ) -> AppState {
assert!(
self.identity,
"transports by scheme need the identity layer"
@@ -136,6 +149,7 @@ impl Sim {
let key = Arc::new(sim_key(id));
self.start_node(id, first, seeds, start, move |config| {
config.identity = Some(IdentityConfig { key, scheme, more });
+ adjust(config);
})
}