Skip to content

Commit 234c2a3

Browse files
authored
fix: dfx start --pocketic does not require --clean (#3984)
* fix: dfx start --pocketic does not require --clean * force * fix
1 parent a08f9de commit 234c2a3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

e2e/tests-dfx/start.bash

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ teardown() {
2121
assert_command diff "$NETWORK_ID_PATH" "$NETWORK_ID_BY_SETTINGS_DIGEST_PATH"
2222
}
2323

24+
@test "start and stop" {
25+
dfx_start
26+
dfx_stop
27+
28+
dfx_start
29+
dfx_stop
30+
}
31+
2432
@test "start and stop with different options" {
2533
[[ "$USE_POCKETIC" ]] && skip "skipped for pocketic: clean required"
2634
dfx_start --artificial-delay 101

src/dfx-core/src/config/model/replica_config.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ impl<'a> CachedConfig<'a> {
222222
}
223223
}
224224
pub fn can_share_state(&self, other: &Self) -> bool {
225-
self == other
225+
// effective canister id does not matter for ability to share state
226+
self.replica_rev == other.replica_rev && self.config == other.config
226227
}
227228
pub fn get_effective_canister_id(&self) -> Option<Principal> {
228229
self.effective_canister_id

0 commit comments

Comments
 (0)