diff --git a/e2e/tests-dfx/start.bash b/e2e/tests-dfx/start.bash index bdfd7d25d6..417a84f180 100644 --- a/e2e/tests-dfx/start.bash +++ b/e2e/tests-dfx/start.bash @@ -21,6 +21,14 @@ teardown() { assert_command diff "$NETWORK_ID_PATH" "$NETWORK_ID_BY_SETTINGS_DIGEST_PATH" } +@test "start and stop" { + dfx_start + dfx_stop + + dfx_start + dfx_stop +} + @test "start and stop with different options" { [[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: clean required" dfx_start --artificial-delay 101 diff --git a/src/dfx-core/src/config/model/replica_config.rs b/src/dfx-core/src/config/model/replica_config.rs index ed4164b56d..510f0420e3 100644 --- a/src/dfx-core/src/config/model/replica_config.rs +++ b/src/dfx-core/src/config/model/replica_config.rs @@ -222,7 +222,8 @@ impl<'a> CachedConfig<'a> { } } pub fn can_share_state(&self, other: &Self) -> bool { - self == other + // effective canister id does not matter for ability to share state + self.replica_rev == other.replica_rev && self.config == other.config } pub fn get_effective_canister_id(&self) -> Option { self.effective_canister_id